Class: Campfire::Runner
- Inherits:
-
Object
- Object
- Campfire::Runner
- Defined in:
- lib/campfire.rb
Class Method Summary collapse
Class Method Details
.run(args) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/campfire.rb', line 5 def self.run(args) Campfire::Config.load_config abort "No Config" if Campfire::Config.config_value('account').blank? campfire = Tinder::Campfire.new Campfire::Config.config_value('account'), :ssl => true, :token => Campfire::Config.config_value('token') room = campfire.find_room_by_name Campfire::Config.config_value('room') if args.length > 0 room.speak "#{args.first}" else room.speak $stdin.read end end |