Method: Flapjack::Gateways::Jabber::Bot#initialize
- Defined in:
- lib/flapjack/gateways/jabber.rb
#initialize(opts = {}) ⇒ Bot
Returns a new instance of Bot.
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 |
# File 'lib/flapjack/gateways/jabber.rb', line 520 def initialize(opts = {}) @lock = opts[:lock] @stop_cond = opts[:stop_condition] @config = opts[:config] @boot_time = opts[:boot_time] @say_buffer = [] @announce_buffer = [] @hostname = Socket.gethostname @alias = @config['alias'] || 'flapjack' @identifiers = ((@config['identifiers'] || []) + [@alias]).uniq @state_buffer = [] @should_quit = false end |