Class: World
- Inherits:
-
Object
- Object
- World
- Defined in:
- lib/r3d3/models/world.rb
Instance Attribute Summary collapse
-
#robot ⇒ Object
Returns the value of attribute robot.
-
#table ⇒ Object
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize ⇒ World
constructor
A new instance of World.
Constructor Details
#initialize ⇒ World
Returns a new instance of World.
8 9 10 11 12 |
# File 'lib/r3d3/models/world.rb', line 8 def initialize # One world contains only a single table and a single Robot @table ||= Table.new @robot ||= Robot.new end |
Instance Attribute Details
#robot ⇒ Object
Returns the value of attribute robot.
6 7 8 |
# File 'lib/r3d3/models/world.rb', line 6 def robot @robot end |
#table ⇒ Object
Returns the value of attribute table.
6 7 8 |
# File 'lib/r3d3/models/world.rb', line 6 def table @table end |