Class: Weechat::IRC::Host
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #identd? ⇒ Boolean (also: #ident?)
-
#initialize(string) ⇒ Host
constructor
A new instance of Host.
Constructor Details
#initialize(string) ⇒ Host
Returns a new instance of Host.
6 7 8 |
# File 'lib/weechat/host.rb', line 6 def initialize(string) @user, @host = string.split("@") end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
5 6 7 |
# File 'lib/weechat/host.rb', line 5 def host @host end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
4 5 6 |
# File 'lib/weechat/host.rb', line 4 def user @user end |
Instance Method Details
#identd? ⇒ Boolean Also known as: ident?
10 11 12 |
# File 'lib/weechat/host.rb', line 10 def identd? @user[0..0] != "~" end |