Class: NERA::Simulator
- Inherits:
-
Object
- Object
- NERA::Simulator
- Defined in:
- lib/nera/nera_simulator.rb
Constant Summary collapse
- @@inherited =
class methods, variables
[]
Instance Attribute Summary collapse
-
#param ⇒ Object
Returns the value of attribute param.
Class Method Summary collapse
- .add_simulator(sim_class) ⇒ Object
- .inherited(subclass) ⇒ Object
- .inherited_simulators ⇒ Object
- .remove_simulator(sim_class) ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ Simulator
constructor
A new instance of Simulator.
Constructor Details
#initialize ⇒ Simulator
Returns a new instance of Simulator.
9 10 11 |
# File 'lib/nera/nera_simulator.rb', line 9 def initialize @param = {} end |
Instance Attribute Details
#param ⇒ Object
Returns the value of attribute param.
7 8 9 |
# File 'lib/nera/nera_simulator.rb', line 7 def param @param end |
Class Method Details
.add_simulator(sim_class) ⇒ Object
30 31 32 33 34 |
# File 'lib/nera/nera_simulator.rb', line 30 def self.add_simulator( sim_class) raise ArgumentError unless sim_class.is_a?(Class) @@inherited << sim_class @@inherited.uniq! end |
.inherited(subclass) ⇒ Object
16 17 18 |
# File 'lib/nera/nera_simulator.rb', line 16 def self.inherited(subclass) @@inherited << subclass end |
.inherited_simulators ⇒ Object
21 22 23 |
# File 'lib/nera/nera_simulator.rb', line 21 def self.inherited_simulators return @@inherited end |
.remove_simulator(sim_class) ⇒ Object
25 26 27 28 |
# File 'lib/nera/nera_simulator.rb', line 25 def self.remove_simulator( sim_class) raise ArgumentError unless sim_class.is_a?(Class) @@inherited -= [ sim_class ] end |