Class: Miu::Nodes::IRC::Node

Inherits:
Object
  • Object
show all
Includes:
Miu::Node
Defined in:
lib/miu/nodes/irc/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Node

Returns a new instance of Node.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/miu/nodes/irc/node.rb', line 12

def initialize(options)
  @options = options

  Miu::Logger.info "Options:"
  @options.each do |k, v|
    Miu::Logger.info "  #{k}: #{v}"
  end

  @client = Client.new(self, {
    :host => options[:host], :port => options[:port],
    :nick => options[:nick], :user => options[:user], :real => options[:real],
    :pass => options[:pass],
    :channels => options[:channels],
  })

  [:INT, :TERM].each do |sig|
    trap(sig) { exit }
  end

  sleep
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



10
11
12
# File 'lib/miu/nodes/irc/node.rb', line 10

def options
  @options
end