Class: Radar::API::TableCellContent
- Inherits:
-
Thrift::Union
- Object
- Thrift::Union
- Radar::API::TableCellContent
- Includes:
- Thrift::Struct_Union
- Defined in:
- lib/radar/api/radar_types.rb
Constant Summary collapse
- TEXT =
1- PERCENT =
2- CURRENCY =
3- NUMBER =
4- FIELDS =
{ TEXT => {:type => ::Thrift::Types::STRING, :name => 'text'}, PERCENT => {:type => ::Thrift::Types::DOUBLE, :name => 'percent'}, CURRENCY => {:type => ::Thrift::Types::DOUBLE, :name => 'currency'}, NUMBER => {:type => ::Thrift::Types::DOUBLE, :name => 'number'} }
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.currency(val) ⇒ Object
361 362 363 |
# File 'lib/radar/api/radar_types.rb', line 361 def currency(val) TableCellContent.new(:currency, val) end |
.number(val) ⇒ Object
365 366 367 |
# File 'lib/radar/api/radar_types.rb', line 365 def number(val) TableCellContent.new(:number, val) end |
.percent(val) ⇒ Object
357 358 359 |
# File 'lib/radar/api/radar_types.rb', line 357 def percent(val) TableCellContent.new(:percent, val) end |
.text(val) ⇒ Object
353 354 355 |
# File 'lib/radar/api/radar_types.rb', line 353 def text(val) TableCellContent.new(:text, val) end |
Instance Method Details
#struct_fields ⇒ Object
382 |
# File 'lib/radar/api/radar_types.rb', line 382 def struct_fields; FIELDS; end |
#validate ⇒ Object
384 385 386 |
# File 'lib/radar/api/radar_types.rb', line 384 def validate raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? end |