Class: Raml::Parser::Body

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/raml/parser/body.rb

Constant Summary collapse

BASIC_ATTRIBUTES =
%w[schema example]

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



12
13
14
# File 'lib/raml/parser/body.rb', line 12

def attributes
  @attributes
end

#bodyObject

Returns the value of attribute body.



12
13
14
# File 'lib/raml/parser/body.rb', line 12

def body
  @body
end

Instance Method Details

#parse(type, attributes) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/raml/parser/body.rb', line 14

def parse(type, attributes)
  @body = Raml::Body.new(type)
  @attributes = prepare_attributes(attributes)

  parse_attributes

  body
end