Class: Raml::Parser::QueryParameter

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

Constant Summary collapse

BASIC_ATTRIBUTES =
%w[description type example required]

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/query_parameter.rb', line 12

def attributes
  @attributes
end

#query_parameterObject

Returns the value of attribute query_parameter.



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

def query_parameter
  @query_parameter
end

Instance Method Details

#parse(name, attributes) ⇒ Object



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

def parse(name, attributes)
  @query_parameter = Raml::QueryParameter.new(name)

  @attributes = prepare_attributes(attributes)
  parse_attributes(attributes)

  query_parameter
end