Module: Growlfire
- Defined in:
- lib/growlfire.rb,
lib/growlfire/version.rb
Defined Under Namespace
Classes: Client
Constant Summary collapse
- VERSION =
"0.0.2"
Class Method Summary collapse
Class Method Details
.debug? ⇒ Boolean
108 109 110 |
# File 'lib/growlfire.rb', line 108 def self.debug? ENV['GROWLFIRE_DEBUG'] == 'true' end |
.icon ⇒ Object
104 105 106 |
# File 'lib/growlfire.rb', line 104 def self.icon File.open(File.join(File.dirname(__FILE__), 'growlfire', 'logo-cf.png'), 'rb').read end |
.run(host, room) ⇒ Object
94 95 96 |
# File 'lib/growlfire.rb', line 94 def self.run(host, room) Client.new(host, token, room).run end |
.token ⇒ Object
98 99 100 101 102 |
# File 'lib/growlfire.rb', line 98 def self.token ENV['CAMPFIRE_TOKEN'] || File.read(File.join(ENV['HOME'], '.campfire')).lines.first.strip rescue raise 'Token not found!' end |