Class: Raibo::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/raibo/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line) ⇒ Message

Returns a new instance of Message.



9
10
11
12
13
14
15
16
# File 'lib/raibo/message.rb', line 9

def initialize(line)
  @prefix, @type, @middle, @trailing = parse_line(line)

  @kind = get_kind
  @from = get_from
  @to   = get_to
  @body = get_body
end

Instance Attribute Details

#bodyObject (readonly)

Readers for higher-level attributes of the message.



7
8
9
# File 'lib/raibo/message.rb', line 7

def body
  @body
end

#fromObject (readonly)

Readers for higher-level attributes of the message.



7
8
9
# File 'lib/raibo/message.rb', line 7

def from
  @from
end

#kindObject (readonly)

Readers for higher-level attributes of the message.



7
8
9
# File 'lib/raibo/message.rb', line 7

def kind
  @kind
end

#middleObject (readonly)

Readers for the components of the actual IRC protocol line.



4
5
6
# File 'lib/raibo/message.rb', line 4

def middle
  @middle
end

#prefixObject (readonly)

Readers for the components of the actual IRC protocol line.



4
5
6
# File 'lib/raibo/message.rb', line 4

def prefix
  @prefix
end

#toObject (readonly)

Readers for higher-level attributes of the message.



7
8
9
# File 'lib/raibo/message.rb', line 7

def to
  @to
end

#trailingObject (readonly)

Readers for the components of the actual IRC protocol line.



4
5
6
# File 'lib/raibo/message.rb', line 4

def trailing
  @trailing
end

#typeObject (readonly)

Readers for the components of the actual IRC protocol line.



4
5
6
# File 'lib/raibo/message.rb', line 4

def type
  @type
end