Module: AWS::Core::OptionGrammar::Descriptors::Double

Extended by:
NoArgs
Defined in:
lib/aws/core/option_grammar/double.rb

Instance Method Summary collapse

Instance Method Details

#encode_value(value) ⇒ Object



20
21
22
# File 'lib/aws/core/option_grammar/double.rb', line 20

def encode_value(value)
  value.to_s
end

#validate(value, context = nil) ⇒ Object



15
16
17
18
# File 'lib/aws/core/option_grammar/double.rb', line 15

def validate(value, context = nil)
  raise format_error("float value", context) unless
    value.respond_to? :to_f
end