class RoboticArm::Base
Public Class Methods
new(robot_arm)
click to toggle source
Calls superclass method
RoboticArm::ComponentMoving::new
# File lib/robotic-arm.rb, line 294 def initialize(robot_arm) super(robot_arm) @switch = 1 end
Public Instance Methods
left(seconds=0)
click to toggle source
# File lib/robotic-arm.rb, line 299 def left(seconds=0) return if @active and @moving == :left activate(@switch, @val=0x02, seconds) @moving = :left end
right(seconds=0)
click to toggle source
# File lib/robotic-arm.rb, line 305 def right(seconds=0) return if @active and @moving == :right activate(@switch, @val=0x01, seconds) @moving = :right end