Class: Rambo::RamlModels::Resource

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#schemaObject (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_methodsObject



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



11
12
13
# File 'lib/rambo/raml_models/resource.rb', line 11

def uri_partial
  schema.uri_partial
end