Module: AWS::Core::OptionGrammar::Descriptors::Boolean

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

Instance Method Summary collapse

Methods included from NoArgs

apply

Instance Method Details

#encode_value(value) ⇒ Object


148
149
150
# File 'lib/aws/core/option_grammar.rb', line 148

def encode_value(value)
  value.to_s
end

#validate(value, context = nil) ⇒ Object


143
144
145
146
# File 'lib/aws/core/option_grammar.rb', line 143

def validate(value, context = nil)
  raise format_error("boolean value", context) unless
    value == true || value == false
end