Module: IRCParser::Messages::ClassMethods

Defined in:
lib/irc_parser/messages.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#identifierObject (readonly)

Returns the value of attribute identifier.



77
78
79
# File 'lib/irc_parser/messages.rb', line 77

def identifier
  @identifier
end

#nameObject (readonly)

Returns the value of attribute name.



77
78
79
# File 'lib/irc_parser/messages.rb', line 77

def name
  @name
end

#postfix_formatObject (readonly)

Returns the value of attribute postfix_format.



77
78
79
# File 'lib/irc_parser/messages.rb', line 77

def postfix_format
  @postfix_format
end

#to_symObject (readonly)

Returns the value of attribute to_sym.



77
78
79
# File 'lib/irc_parser/messages.rb', line 77

def to_sym
  @to_sym
end

Instance Method Details

#is_command?Boolean

Returns:

  • (Boolean)


87
88
89
# File 'lib/irc_parser/messages.rb', line 87

def is_command?
  !(@name =~ /^(Rpl|Err)[A-Z]/)
end

#is_error?Boolean

Returns:

  • (Boolean)


79
80
81
# File 'lib/irc_parser/messages.rb', line 79

def is_error?
  !(@name !~ /^Err[A-Z]/)
end

#is_reply?Boolean

Returns:

  • (Boolean)


83
84
85
# File 'lib/irc_parser/messages.rb', line 83

def is_reply?
  !(@name !~ /^Rpl[A-Z]/)
end