Class: Storm::ComponentObject
- Inherits:
-
Thrift::Union
- Object
- Thrift::Union
- Storm::ComponentObject
- Includes:
- Thrift::Struct_Union
- Defined in:
- lib/storm/thrift/storm_types.rb
Constant Summary collapse
- SERIALIZED_JAVA =
1
- SHELL =
2
- JAVA_OBJECT =
3
- FIELDS =
{ SERIALIZED_JAVA => {:type => ::Thrift::Types::STRING, :name => 'serialized_java', :binary => true}, SHELL => {:type => ::Thrift::Types::STRUCT, :name => 'shell', :class => ShellComponent}, JAVA_OBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'java_object', :class => JavaObject} }
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.java_object(val) ⇒ Object
232 233 234 |
# File 'lib/storm/thrift/storm_types.rb', line 232 def java_object(val) ComponentObject.new(:java_object, val) end |
.serialized_java(val) ⇒ Object
224 225 226 |
# File 'lib/storm/thrift/storm_types.rb', line 224 def serialized_java(val) ComponentObject.new(:serialized_java, val) end |
.shell(val) ⇒ Object
228 229 230 |
# File 'lib/storm/thrift/storm_types.rb', line 228 def shell(val) ComponentObject.new(:shell, val) end |
Instance Method Details
#struct_fields ⇒ Object
247 |
# File 'lib/storm/thrift/storm_types.rb', line 247 def struct_fields; FIELDS; end |
#validate ⇒ Object
249 250 251 |
# File 'lib/storm/thrift/storm_types.rb', line 249 def validate raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? end |