Class: Paypal::Api::Coerce
- Defined in:
- lib/paypal_api/support/parameter.rb
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Attributes inherited from Parameter
Instance Method Summary collapse
-
#initialize(method) ⇒ Coerce
constructor
A new instance of Coerce.
- #parse(val) ⇒ Object
Methods inherited from Parameter
Constructor Details
#initialize(method) ⇒ Coerce
Returns a new instance of Coerce.
117 118 119 |
# File 'lib/paypal_api/support/parameter.rb', line 117 def initialize(method) @method = method end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
115 116 117 |
# File 'lib/paypal_api/support/parameter.rb', line 115 def method @method end |
Instance Method Details
#parse(val) ⇒ Object
121 122 123 |
# File 'lib/paypal_api/support/parameter.rb', line 121 def parse(val) return @method.call(val) end |