Module: Flint::DSL

Defined in:
lib/flint/dsl.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.clientObject



3
4
5
# File 'lib/flint/dsl.rb', line 3

def client
  @client ||= Client.new
end

Instance Method Details

#message(gaurd, &block) ⇒ Object



16
17
18
# File 'lib/flint/dsl.rb', line 16

def message(gaurd, &block)
  client.register_handler(:message, gaurd, &block)
end

#ready(&block) ⇒ Object



12
13
14
# File 'lib/flint/dsl.rb', line 12

def ready(&block)
  client.register_handler(:ready, nil, &block)
end

#say(message) ⇒ Object



20
21
22
# File 'lib/flint/dsl.rb', line 20

def say(message)
  client.say(message)
end

#setup(token, account, room_id) ⇒ Object



8
9
10
# File 'lib/flint/dsl.rb', line 8

def setup(token, , room_id)
  client.setup(token, , room_id)
end