Class: Ruboty::Hubot::Robot

Inherits:
Object
  • Object
show all
Includes:
Mem
Defined in:
lib/ruboty/hubot/robot.rb

Instance Method Summary collapse

Constructor Details

#initializeRobot

Returns a new instance of Robot.



8
9
10
# File 'lib/ruboty/hubot/robot.rb', line 8

def initialize
  @scripts = []
end

Instance Method Details

#load_script(script) ⇒ Object



12
13
14
# File 'lib/ruboty/hubot/robot.rb', line 12

def load_script(script)
  @scripts << script
end

#receive(text) ⇒ Object



16
17
18
19
20
# File 'lib/ruboty/hubot/robot.rb', line 16

def receive(text)
  if res_text = robot_context.call("ruboty.receive", text)
    yield res_text if block_given?
  end
end