Class: SimpleParams::ApiPieDoc::Attribute
- Inherits:
-
AttributeBase
- Object
- AttributeBase
- SimpleParams::ApiPieDoc::Attribute
- Defined in:
- lib/simple_params/api_pie_doc/attribute.rb
Instance Attribute Summary
Attributes inherited from AttributeBase
Instance Method Summary collapse
-
#initialize(simple_params_attribute) ⇒ Attribute
constructor
A new instance of Attribute.
- #name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(simple_params_attribute) ⇒ Attribute
Returns a new instance of Attribute.
4 5 6 7 |
# File 'lib/simple_params/api_pie_doc/attribute.rb', line 4 def initialize(simple_params_attribute) super self. ||= attribute[1] end |
Instance Method Details
#name ⇒ Object
9 10 11 |
# File 'lib/simple_params/api_pie_doc/attribute.rb', line 9 def name attribute[0].to_s end |
#to_s ⇒ Object
13 14 15 16 |
# File 'lib/simple_params/api_pie_doc/attribute.rb', line 13 def to_s return nil if do_not_document? attribute_description end |