Class: Simplepay::Support::Boolean
- Inherits:
-
Object
- Object
- Simplepay::Support::Boolean
- Defined in:
- lib/simplepay/support/boolean.rb
Overview
Acts as a delegator for Simplepay::Support::Field :class
.
This class acts as a helper for sending boolean values to Amazon. In their forms, booleans are expected to be either “0” or “1”, for false or true, respectively.
Instance Method Summary collapse
-
#initialize(value) ⇒ Boolean
constructor
A new instance of Boolean.
-
#to_s ⇒ Object
Returns “1” if the boolean is true, “0” otherwise.
Constructor Details
#initialize(value) ⇒ Boolean
Returns a new instance of Boolean.
13 14 15 |
# File 'lib/simplepay/support/boolean.rb', line 13 def initialize(value) @value = value end |