Module: Jabot

Defined in:
lib/jabot.rb,
lib/jabot/dsl.rb,
lib/jabot/jabber.rb,
lib/jabot/version.rb,
lib/jabot/commands.rb

Defined Under Namespace

Modules: DSL Classes: Base, Commands, Jabber

Constant Summary collapse

VERSION =
'0.3'

Class Method Summary collapse

Class Method Details

.start(&block) ⇒ Object

start jabot

Example: Jabot.start do

standalone_mode

username '[email protected]'
password '*****'
clients %w{[email protected]}

command :download_file do |url, save_path|
  spawn("wget -c -O '#{save_path}' '#{url}'")
end

command :hello do
  'Hello!'
end

end



82
83
84
85
86
# File 'lib/jabot.rb', line 82

def self.start(&block)
  @base = Base.new
  @base.configure(&block)
  @base.start_listen
end