Class: SetupConfiguration::ParameterReference
- Inherits:
-
Object
- Object
- SetupConfiguration::ParameterReference
- Includes:
- Enumerable
- Defined in:
- lib/setup_configuration/setup_config.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #<=>(parameter) ⇒ Object
- #assign(parameter) ⇒ Object
- #assigned? ⇒ Boolean
- #dependency ⇒ Object
-
#initialize(key) ⇒ ParameterReference
constructor
A new instance of ParameterReference.
- #machine_type ⇒ Object
- #number ⇒ Object
- #options ⇒ Object
- #param? ⇒ Boolean
- #roles ⇒ Object
Constructor Details
#initialize(key) ⇒ ParameterReference
Returns a new instance of ParameterReference.
369 370 371 372 |
# File 'lib/setup_configuration/setup_config.rb', line 369 def initialize(key) @key = key @param=nil end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
367 368 369 |
# File 'lib/setup_configuration/setup_config.rb', line 367 def key @key end |
Instance Method Details
#<=>(parameter) ⇒ Object
402 403 404 |
# File 'lib/setup_configuration/setup_config.rb', line 402 def <=>(parameter) self.number <=> parameter.number end |
#assign(parameter) ⇒ Object
374 375 376 |
# File 'lib/setup_configuration/setup_config.rb', line 374 def assign(parameter) @param = parameter end |
#assigned? ⇒ Boolean
378 379 380 |
# File 'lib/setup_configuration/setup_config.rb', line 378 def assigned? @param end |
#dependency ⇒ Object
390 391 392 |
# File 'lib/setup_configuration/setup_config.rb', line 390 def dependency assigned? ? @param.dependency : :none end |
#machine_type ⇒ Object
386 387 388 |
# File 'lib/setup_configuration/setup_config.rb', line 386 def machine_type assigned? ? @param.machine_type : 0 end |
#number ⇒ Object
382 383 384 |
# File 'lib/setup_configuration/setup_config.rb', line 382 def number assigned? ? @param.number : 1 end |
#options ⇒ Object
394 395 396 |
# File 'lib/setup_configuration/setup_config.rb', line 394 def assigned? ? @param. : 0 end |
#param? ⇒ Boolean
406 407 408 |
# File 'lib/setup_configuration/setup_config.rb', line 406 def param? false end |
#roles ⇒ Object
398 399 400 |
# File 'lib/setup_configuration/setup_config.rb', line 398 def roles assigned? ? @param.roles : 0 end |