Class: Paypal::Api::Coerce

Inherits:
Parameter show all
Defined in:
lib/paypal_api/support/parameter.rb

Instance Attribute Summary collapse

Attributes inherited from Parameter

#value

Instance Method Summary collapse

Methods inherited from Parameter

#parameter_parse

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

#methodObject (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