Class: Simulator::Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/simulator/variable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_valueObject (readonly)

Returns the value of attribute default_value.



3
4
5
# File 'lib/simulator/variable.rb', line 3

def default_value
  @default_value
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/simulator/variable.rb', line 3

def name
  @name
end