Class: Rambo::RamlModels::Resource
- Inherits:
-
Object
- Object
- Rambo::RamlModels::Resource
- Defined in:
- lib/rambo/raml_models/resource.rb
Instance Attribute Summary collapse
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
- #http_methods ⇒ Object
-
#initialize(raml_resource) ⇒ Resource
constructor
A new instance of Resource.
- #uri_partial ⇒ Object (also: #to_s)
Constructor Details
#initialize(raml_resource) ⇒ Resource
7 8 9 |
# File 'lib/rambo/raml_models/resource.rb', line 7 def initialize(raml_resource) @schema = raml_resource end |
Instance Attribute Details
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
5 6 7 |
# File 'lib/rambo/raml_models/resource.rb', line 5 def schema @schema end |
Instance Method Details
#http_methods ⇒ Object
17 18 19 |
# File 'lib/rambo/raml_models/resource.rb', line 17 def http_methods @http_methods ||= schema.methods.map {|method| Rambo::RamlModels::Method.new(method) } end |
#uri_partial ⇒ Object Also known as: to_s
11 12 13 |
# File 'lib/rambo/raml_models/resource.rb', line 11 def uri_partial schema.uri_partial end |