Module: Hipnote

Defined in:
lib/hipnote.rb,
lib/hipnote/version.rb

Constant Summary collapse

VERSION =
"0.0.7"

Class Method Summary collapse

Class Method Details

.post(room, msg, options = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/hipnote.rb', line 8

def self.post(room, msg, options = {})
  title = options[:title] || 'Note'
  format = options[:format] || 'text'
  color = options[:color] || 'yellow'

  if msg && room
    @client[room].send(
      title,
      msg,
      message_format: format,
      color: color
    )
  end
end