Module: Artoo
- Defined in:
- lib/artoo/main.rb,
lib/artoo/port.rb,
lib/artoo/basic.rb,
lib/artoo/robot.rb,
lib/artoo/device.rb,
lib/artoo/events.rb,
lib/artoo/master.rb,
lib/artoo/api/api.rb,
lib/artoo/utility.rb,
lib/artoo/version.rb,
lib/artoo/delegator.rb,
lib/artoo/connection.rb,
lib/artoo/exceptions.rb,
lib/artoo/drivers/ping.rb,
lib/artoo/drivers/test.rb,
lib/artoo/adaptors/test.rb,
lib/artoo/drivers/driver.rb,
lib/artoo/drivers/random.rb,
lib/artoo/adaptors/io/i2c.rb,
lib/artoo/commands/socket.rb,
lib/artoo/drivers/counter.rb,
lib/artoo/interfaces/ping.rb,
lib/artoo/adaptors/adaptor.rb,
lib/artoo/commands/install.rb,
lib/artoo/drivers/passthru.rb,
lib/artoo/interfaces/rover.rb,
lib/artoo/adaptors/loopback.rb,
lib/artoo/api/route_helpers.rb,
lib/artoo/commands/commands.rb,
lib/artoo/commands/generate.rb,
lib/artoo/generators/adaptor.rb,
lib/artoo/drivers/device_info.rb,
lib/artoo/robot_class_methods.rb,
lib/artoo/interfaces/interface.rb,
lib/artoo/adaptors/io/digital_pin.rb,
lib/artoo/api/device_event_client.rb
Defined Under Namespace
Modules: Adaptors, Api, Basic, Commands, Delegator, Drivers, Events, Generator, Interfaces, Utility Classes: Connection, Device, InvalidPin, MainRobot, Master, Port, Robot, RobotNotFound
Constant Summary collapse
- VERSION =
"1.8.0"
Class Method Summary collapse
-
.new(robot = Robot, options = {}, &block) ⇒ Object
Create a new Artoo robot.
Class Method Details
.new(robot = Robot, options = {}, &block) ⇒ Object
Create a new Artoo robot. The block is evaluated in the new robot’s class scope.
34 35 36 37 38 |
# File 'lib/artoo/delegator.rb', line 34 def self.new(robot=Robot, ={}, &block) robot = Class.new(robot) robot.class_eval(&block) if block_given? robot end |