Class: SetupConfiguration::Parameter

Inherits:
Object
  • Object
show all
Includes:
Enumerable, ParameterMachineTypeBridge
Defined in:
lib/setup_configuration/setup_config.rb

Direct Known Subclasses

Legacy::Parameter

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dependencyObject (readonly)

Returns the value of attribute dependency.



277
278
279
# File 'lib/setup_configuration/setup_config.rb', line 277

def dependency
  @dependency
end

#keyObject

Returns the value of attribute key.



275
276
277
# File 'lib/setup_configuration/setup_config.rb', line 275

def key
  @key
end

#machine_typeObject (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

#numberObject

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

Returns:

  • (Boolean)


301
302
303
# File 'lib/setup_configuration/setup_config.rb', line 301

def param?
  true
end