Class: Weechat::IRC::Identifier

Inherits:
Object
  • Object
show all
Defined in:
lib/weechat/irc/identifier.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Identifier

Returns a new instance of Identifier



6
7
8
# File 'lib/weechat/irc/identifier.rb', line 6

def initialize(string)
  @user, @host = string.split("@")
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host



5
6
7
# File 'lib/weechat/irc/identifier.rb', line 5

def host
  @host
end

#userObject (readonly)

Returns the value of attribute user



4
5
6
# File 'lib/weechat/irc/identifier.rb', line 4

def user
  @user
end

Instance Method Details

#identd?Boolean Also known as: ident?

Returns:



10
11
12
# File 'lib/weechat/irc/identifier.rb', line 10

def identd?
  @user[0..0] != "~"
end