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 type]
IGNORED_ATTRIBUTES =
%w[properties default]

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

#bodyObject

Returns the value of attribute body.



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

def body
  @body
end

Instance Method Details

#parse(type, attributes) ⇒ Object



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

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

  parse_attributes

  body
end