class AWS::Record::Attributes::FloatAttr

Public Class Methods

allow_set?() click to toggle source

@private

# File lib/aws/record/attributes.rb, line 245
def self.allow_set?
  true
end
serialize(float, options = {}) click to toggle source
# File lib/aws/record/attributes.rb, line 240
def self.serialize float, options = {}
  expect(Float, float) { float }
end
type_cast(raw_value, options = {}) click to toggle source
# File lib/aws/record/attributes.rb, line 228
def self.type_cast raw_value, options = {}
  case raw_value
  when nil   then nil
  when ''    then nil
  when Float then raw_value
  else
    raw_value.respond_to?(:to_f) ? 
      raw_value.to_f :
      raw_value.to_s.to_f
  end
end