Class: Rambo::RamlModels::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/rambo/raml_models/resource.rb

Instance Method Summary collapse

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_methodsObject



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_partialObject Also known as: to_s



13
14
15
# File 'lib/rambo/raml_models/resource.rb', line 13

def uri_partial
  schema.uri_partial
end