Class: SetupConfiguration::Parameter
- Inherits:
-
Object
- Object
- SetupConfiguration::Parameter
- Includes:
- Enumerable, ParameterMachineTypeBridge
- Defined in:
- lib/setup_configuration/setup_config.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dependency ⇒ Object
readonly
Returns the value of attribute dependency.
-
#key ⇒ Object
Returns the value of attribute key.
-
#machine_type ⇒ Object
readonly
Returns the value of attribute machine_type.
-
#number ⇒ Object
Returns the value of attribute number.
Instance Method Summary collapse
- #<=>(parameter) ⇒ Object
- #depends_on(dependency) ⇒ Object
- #for_machine_type(machine_type) ⇒ Object
-
#initialize(name, number) ⇒ Parameter
constructor
A new instance of Parameter.
- #param? ⇒ Boolean
Constructor Details
#initialize(name, number) ⇒ Parameter
Returns a new instance of Parameter.
280 281 282 283 284 285 286 287 |
# File 'lib/setup_configuration/setup_config.rb', line 280 def initialize(name, number) # depends upon no other parameter @dependency=:none # valid on all machines @machine_type=0 @key= name @number=number end |
Instance Attribute Details
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency.
277 278 279 |
# File 'lib/setup_configuration/setup_config.rb', line 277 def dependency @dependency end |
#key ⇒ Object
Returns the value of attribute key.
275 276 277 |
# File 'lib/setup_configuration/setup_config.rb', line 275 def key @key end |
#machine_type ⇒ Object (readonly)
Returns the value of attribute machine_type.
278 279 280 |
# File 'lib/setup_configuration/setup_config.rb', line 278 def machine_type @machine_type end |
#number ⇒ Object
Returns the value of attribute number.
276 277 278 |
# File 'lib/setup_configuration/setup_config.rb', line 276 def number @number end |
Instance Method Details
#<=>(parameter) ⇒ Object
297 298 299 |
# File 'lib/setup_configuration/setup_config.rb', line 297 def <=>(parameter) self.number <=> parameter.number end |
#depends_on(dependency) ⇒ Object
289 290 291 |
# File 'lib/setup_configuration/setup_config.rb', line 289 def depends_on(dependency) @dependency=dependency end |
#for_machine_type(machine_type) ⇒ Object
293 294 295 |
# File 'lib/setup_configuration/setup_config.rb', line 293 def for_machine_type(machine_type) @machine_type=machine_type end |
#param? ⇒ Boolean
301 302 303 |
# File 'lib/setup_configuration/setup_config.rb', line 301 def param? true end |