class Raml::Parser::QueryParameter
Constants
- BASIC_ATTRIBUTES
- IGNORED_ATTRIBUTES
Attributes
attributes[RW]
query_parameter[RW]
Public Instance Methods
parse(name, attributes)
click to toggle source
# File lib/raml/parser/query_parameter.rb, line 15 def parse(name, attributes) @query_parameter = Raml::QueryParameter.new(name) @attributes = prepare_attributes(attributes) parse_attributes(attributes) query_parameter end
Private Instance Methods
parse_attributes(attributes)
click to toggle source
# File lib/raml/parser/query_parameter.rb, line 26 def parse_attributes(attributes) attributes.each do |key, value| key = underscore(key) case key when *IGNORED_ATTRIBUTES # nothing when *BASIC_ATTRIBUTES query_parameter.send("#{key}=".to_sym, value) else raise UnknownAttributeError.new "Unknown query paramter key: #{key}" end end if attributes end