Class: RedStorm::SimpleTopology::ComponentDefinition
- Inherits:
-
Configurator
- Object
- Configurator
- RedStorm::SimpleTopology::ComponentDefinition
- Defined in:
- lib/red_storm/simple_topology.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#clazz ⇒ Object
readonly
Returns the value of attribute clazz.
-
#id ⇒ Object
ids are forced to string.
-
#parallelism ⇒ Object
readonly
Returns the value of attribute parallelism.
Attributes inherited from Configurator
Instance Method Summary collapse
-
#initialize(component_class, id, parallelism) ⇒ ComponentDefinition
constructor
A new instance of ComponentDefinition.
- #is_java? ⇒ Boolean
Methods inherited from Configurator
Constructor Details
#initialize(component_class, id, parallelism) ⇒ ComponentDefinition
Returns a new instance of ComponentDefinition.
19 20 21 22 23 24 |
# File 'lib/red_storm/simple_topology.rb', line 19 def initialize(component_class, id, parallelism) super() @clazz = component_class @id = id.to_s @parallelism = parallelism end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RedStorm::Configurator
Instance Attribute Details
#clazz ⇒ Object (readonly)
Returns the value of attribute clazz.
16 17 18 |
# File 'lib/red_storm/simple_topology.rb', line 16 def clazz @clazz end |
#id ⇒ Object
ids are forced to string
17 18 19 |
# File 'lib/red_storm/simple_topology.rb', line 17 def id @id end |
#parallelism ⇒ Object (readonly)
Returns the value of attribute parallelism.
16 17 18 |
# File 'lib/red_storm/simple_topology.rb', line 16 def parallelism @parallelism end |
Instance Method Details
#is_java? ⇒ Boolean
26 27 28 |
# File 'lib/red_storm/simple_topology.rb', line 26 def is_java? @clazz.name.split('::').first.downcase == 'java' end |