Class: Restspec::Schema::AttributeExample
- Inherits:
-
Struct
- Object
- Struct
- Restspec::Schema::AttributeExample
- Defined in:
- lib/restspec/schema/attribute_example.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
Instance Method Summary collapse
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute
5 6 7 |
# File 'lib/restspec/schema/attribute_example.rb', line 5 def attribute @attribute end |
Instance Method Details
#value ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/restspec/schema/attribute_example.rb', line 6 def value if attribute.example.present? attribute.example.try(:call) || attribute.example else type.example_for(attribute) end end |