class Rambo::RamlModels::Method
Attributes
schema[R]
Public Class Methods
new(raml_method, headers=Headers.new({}))
click to toggle source
# File lib/rambo/raml_models/method.rb, line 6 def initialize(raml_method, headers=Headers.new({})) @schema = raml_method @headers = headers end
Public Instance Methods
description()
click to toggle source
# File lib/rambo/raml_models/method.rb, line 19 def description @description ||= schema.description end
headers()
click to toggle source
# File lib/rambo/raml_models/method.rb, line 23 def headers @headers.add(schema.headers) if schema.headers end
method()
click to toggle source
# File lib/rambo/raml_models/method.rb, line 11 def method schema.method end
request_body()
click to toggle source
# File lib/rambo/raml_models/method.rb, line 15 def request_body Rambo::RamlModels::Body.new(schema.bodies.first) if has_request_body? end
responses()
click to toggle source
# File lib/rambo/raml_models/method.rb, line 27 def responses @responses ||= schema.responses.map {|resp| Rambo::RamlModels::Response.new(resp) } end
Private Instance Methods
has_request_body?()
click to toggle source
# File lib/rambo/raml_models/method.rb, line 33 def has_request_body? !!schema.bodies.first end