Class: SwaggerYard::ListingInfo
- Inherits:
-
Object
- Object
- SwaggerYard::ListingInfo
- Defined in:
- lib/swagger_yard/listing_info.rb
Instance Attribute Summary collapse
-
#authorizations ⇒ Object
readonly
Returns the value of attribute authorizations.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#resource_path ⇒ Object
readonly
Returns the value of attribute resource_path.
Instance Method Summary collapse
-
#initialize(yard_object) ⇒ ListingInfo
constructor
A new instance of ListingInfo.
Constructor Details
#initialize(yard_object) ⇒ ListingInfo
Returns a new instance of ListingInfo.
5 6 7 8 9 10 11 12 13 |
# File 'lib/swagger_yard/listing_info.rb', line 5 def initialize(yard_object) @description = yard_object.docstring if tag = yard_object..detect {|t| t.tag_name == "resource_path"} @resource_path = tag.text.downcase end = yard_object..select {|t| t.tag_name == "authorize_with"}.map(&:text) end |
Instance Attribute Details
#authorizations ⇒ Object (readonly)
Returns the value of attribute authorizations.
3 4 5 |
# File 'lib/swagger_yard/listing_info.rb', line 3 def end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/swagger_yard/listing_info.rb', line 3 def description @description end |
#resource_path ⇒ Object (readonly)
Returns the value of attribute resource_path.
3 4 5 |
# File 'lib/swagger_yard/listing_info.rb', line 3 def resource_path @resource_path end |