Class: Simulator::Variable
- Inherits:
-
Object
- Object
- Simulator::Variable
- Defined in:
- lib/simulator/variable.rb
Instance Attribute Summary collapse
-
#default_value ⇒ Object
readonly
Returns the value of attribute default_value.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, default_value = nil) ⇒ Variable
constructor
A new instance of Variable.
Constructor Details
#initialize(name, default_value = nil) ⇒ Variable
Returns a new instance of Variable.
5 6 7 8 |
# File 'lib/simulator/variable.rb', line 5 def initialize(name, default_value = nil) @name = name @default_value = default_value end |
Instance Attribute Details
#default_value ⇒ Object (readonly)
Returns the value of attribute default_value.
3 4 5 |
# File 'lib/simulator/variable.rb', line 3 def default_value @default_value end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/simulator/variable.rb', line 3 def name @name end |