Class: CurrencyProperty

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/linerb/gen-rb/takagi_chan_types.rb,
lib/linerb/gen-rb/takagi_chan_types.rb

Constant Summary collapse

CODE =
1
SYMBOL =
2
POSITION =
3
SCALE =
4
FIELDS =
{
  CODE => {:type => ::Thrift::Types::STRING, :name => 'code'},
  SYMBOL => {:type => ::Thrift::Types::STRING, :name => 'symbol'},
  POSITION => {:type => ::Thrift::Types::I32, :name => 'position', :enum_class => ::G_a_r1_x_d},
  SCALE => {:type => ::Thrift::Types::I32, :name => 'scale'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



11486
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 11486

def struct_fields; FIELDS; end

#validateObject



11488
11489
11490
11491
11492
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 11488

def validate
  unless @position.nil? || ::G_a_r1_x_d::VALID_VALUES.include?(@position)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field position!')
  end
end