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
318 319 320 |
# File 'lib/radar/api/radar_types.rb', line 318 def currency(val) TableCellContent.new(:currency, val) end |
.number(val) ⇒ Object
322 323 324 |
# File 'lib/radar/api/radar_types.rb', line 322 def number(val) TableCellContent.new(:number, val) end |
.percent(val) ⇒ Object
314 315 316 |
# File 'lib/radar/api/radar_types.rb', line 314 def percent(val) TableCellContent.new(:percent, val) end |
.text(val) ⇒ Object
310 311 312 |
# File 'lib/radar/api/radar_types.rb', line 310 def text(val) TableCellContent.new(:text, val) end |
Instance Method Details
#struct_fields ⇒ Object
339 |
# File 'lib/radar/api/radar_types.rb', line 339 def struct_fields; FIELDS; end |
#validate ⇒ Object
341 342 343 |
# File 'lib/radar/api/radar_types.rb', line 341 def validate raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? end |