Class: World

Inherits:
Object
  • Object
show all
Defined in:
lib/r3d3/models/world.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWorld

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

#robotObject

Returns the value of attribute robot.



6
7
8
# File 'lib/r3d3/models/world.rb', line 6

def robot
  @robot
end

#tableObject

Returns the value of attribute table.



6
7
8
# File 'lib/r3d3/models/world.rb', line 6

def table
  @table
end