Skip to content

Commit

Permalink
Allow resource name be a Class
Browse files Browse the repository at this point in the history
  • Loading branch information
shhavel committed Jan 15, 2015
1 parent 7d2eced commit 682824c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/rspec_api_documentation/views/markup_example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def respond_to?(method, include_private = false)
end

def dirname
resource_name.downcase.gsub(/\s+/, '_').gsub(":", "_")
resource_name.to_s.downcase.gsub(/\s+/, '_').gsub(":", "_")
end

def filename
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def initialize(example)
end

def resource_name
example.resource_name.downcase.gsub(/\s+/, '_')
example.resource_name.to_s.downcase.gsub(/\s+/, '_')
end

def description
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec_api_documentation/writers/json_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def respond_to?(method, include_private = false)
end

def dirname
resource_name.downcase.gsub(/\s+/, '_')
resource_name.to_s.downcase.gsub(/\s+/, '_')
end

def filename
Expand Down

0 comments on commit 682824c

Please sign in to comment.