Module: RSpecApi::DSL::Attributes
- Included in:
- RSpecApi::DSL
- Defined in:
- lib/rspec-api/dsl/attributes.rb
Instance Method Summary collapse
Instance Method Details
#attributes_of(resource) ⇒ Object
8 9 10 |
# File 'lib/rspec-api/dsl/attributes.rb', line 8 def attributes_of(resource) @resources.find{|r| r.description == resource.to_s.pluralize.humanize}.instance_variable_get '@attributes' end |
#has_attribute(name, options = {}, &block) ⇒ Object
4 5 6 |
# File 'lib/rspec-api/dsl/attributes.rb', line 4 def has_attribute(name, = {}, &block) @attributes[name] = end |