Class: Paypal::Api::Optional

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

Overview

Optional and Default can take other parameters as input

Instance Attribute Summary

Attributes inherited from Parameter

#value

Instance Method Summary collapse

Methods inherited from Parameter

#parameter_parse

Constructor Details

#initialize(parameter = nil) ⇒ Optional

Returns a new instance of Optional.



170
171
172
# File 'lib/paypal_api/support/parameter.rb', line 170

def initialize(parameter = nil)
	@parameter = parameter.is_a?(Sequential) ? parameter.clone : parameter
end

Instance Method Details

#parse(val) ⇒ Object



174
175
176
# File 'lib/paypal_api/support/parameter.rb', line 174

def parse(val)
	return parameter_parse(val)
end