Class: PayPal::SDK::Core::API::DataTypes::Enum

Inherits:
SimpleTypes::String show all
Defined in:
lib/paypal-sdk/core/api/data_types/enum.rb

Class Method Summary collapse

Methods inherited from SimpleTypes::String

new, #to_yaml_type

Class Method Details

.optionsObject


7
8
9
# File 'lib/paypal-sdk/core/api/data_types/enum.rb', line 7

def options
  @options ||= []
end

.options=(options) ⇒ Object


11
12
13
14
15
16
17
18
19
20
# File 'lib/paypal-sdk/core/api/data_types/enum.rb', line 11

def options=(options)
  if options.is_a? Hash
    options.each do |const_name, value|
      const_set(const_name, value)
    end
    @options = options.values
  else
    @options = options
  end
end