Skip to content

Commit

Permalink
Merge pull request #190 from shhavel/allow_resource_name_be_a_class
Browse files Browse the repository at this point in the history
Allow resource name be a Class
  • Loading branch information
oestrich committed Jan 16, 2015
2 parents 7d2eced + 682824c commit dc861da
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 dc861da

Please sign in to comment.