class MyToyRobot::Table
Public Class Methods
new(width, length)
click to toggle source
# File lib/my_toy_robot/table.rb, line 3 def initialize(width, length) @width = width @length = length end
Public Instance Methods
valid_location?(east, north)
click to toggle source
# File lib/my_toy_robot/table.rb, line 8 def valid_location?(east, north) east >= 0 && east < @width && north >= 0 && north < @length end