class Fog::Parsers::Schema::NodeValue

Public Instance Methods

next_result() click to toggle source
# File lib/ext_fog_aws/fog/parsers/schema.rb, line 132
def next_result
  {}
end
next_schema() click to toggle source
# File lib/ext_fog_aws/fog/parsers/schema.rb, line 128
def next_schema
  {}
end
update_result(value) click to toggle source
# File lib/ext_fog_aws/fog/parsers/schema.rb, line 136
def update_result(value)
  if @index
    @result_pointer[name][@index] = cast(value)
  else
    @result_pointer[name] = cast(value)
  end
end

Private Instance Methods

cast(value) click to toggle source
# File lib/ext_fog_aws/fog/parsers/schema.rb, line 146
def cast(value)
  case @schema_pointer[name]
  when :boolean
    value == "true"
  when :time
    Time.parse(value)
  when :integer
    value.to_i
  when :float
    value.to_f
  else
    value
  end
end