Class: CampfireBot::Standup::Plugin
- Inherits:
-
Plugin
- Object
- Plugin
- CampfireBot::Standup::Plugin
- Defined in:
- lib/campfire_bot/standup.rb
Instance Method Summary collapse
-
#initialize ⇒ Plugin
constructor
A new instance of Plugin.
- #standup(msg) ⇒ Object
Constructor Details
#initialize ⇒ Plugin
Returns a new instance of Plugin.
8 9 10 |
# File 'lib/campfire_bot/standup.rb', line 8 def initialize @config = YAML::load(ERB.new(File.read("#{BOT_ROOT}/standup-config.yml")).result)[BOT_ENVIRONMENT] end |
Instance Method Details
#standup(msg) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/campfire_bot/standup.rb', line 12 def standup(msg) bot.log.debug "sending standup email to #{to_addresses}" Pony.mail({ :to => to_addresses, :from => from(msg), :subject => subject, :body => msg[:message] }.merge()) msg.speak "Sent standup email to #{to_addresses.join(', ')}" end |