Class: Swaggard::Swagger::Property
- Inherits:
-
Object
- Object
- Swaggard::Swagger::Property
- Defined in:
- lib/swaggard/swagger/property.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(yard_object) ⇒ Property
constructor
A new instance of Property.
- #to_doc ⇒ Object
Constructor Details
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
7 8 9 |
# File 'lib/swaggard/swagger/property.rb', line 7 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/swaggard/swagger/property.rb', line 7 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/swaggard/swagger/property.rb', line 7 def type @type end |
Instance Method Details
#to_doc ⇒ Object
15 16 17 18 19 |
# File 'lib/swaggard/swagger/property.rb', line 15 def to_doc result = @type.to_doc result['description'] = @description if @description result end |