Class: Rambo::RamlModels::Resource
- Inherits:
-
Object
- Object
- Rambo::RamlModels::Resource
- Defined in:
- lib/rambo/raml_models/resource.rb
Instance Method Summary collapse
- #http_methods ⇒ Object
-
#initialize(raml_resource, headers = Rambo::RamlModels::Headers.new({})) ⇒ Resource
constructor
A new instance of Resource.
- #uri_partial ⇒ Object (also: #to_s)
Constructor Details
#initialize(raml_resource, headers = Rambo::RamlModels::Headers.new({})) ⇒ Resource
Returns a new instance of Resource.
8 9 10 11 |
# File 'lib/rambo/raml_models/resource.rb', line 8 def initialize(raml_resource, headers=Rambo::RamlModels::Headers.new({})) @schema = raml_resource @headers = headers end |
Instance Method Details
#http_methods ⇒ Object
19 20 21 |
# File 'lib/rambo/raml_models/resource.rb', line 19 def http_methods @http_methods ||= schema.http_methods.map {|method| Rambo::RamlModels::Method.new(method, headers) } end |
#uri_partial ⇒ Object Also known as: to_s
13 14 15 |
# File 'lib/rambo/raml_models/resource.rb', line 13 def uri_partial schema.uri_partial end |