Class: Zircon
- Inherits:
-
Object
- Object
- Zircon
- Includes:
- Callback
- Defined in:
- lib/zircon.rb,
lib/zircon/message.rb,
lib/zircon/version.rb,
lib/zircon/callback.rb,
lib/zircon/message/patterns.rb
Defined Under Namespace
Modules: Callback Classes: Message
Constant Summary collapse
- COMMAND_NAMES =
%w[ ADMIN AWAY CREDITS CYCLE DALINFO INVITE ISON JOIN KICK KNOCK LICENSE LINKS LIST LUSERS MAP MODE MOTD NAMES NICK NOTICE PART PASS PING PONG PRIVMSG QUIT RULES SETNAME SILENCE STATS TIME TOPIC USER USERHOST VERSION VHOST WATCH WHO WHOIS WHOWAS ].freeze
- VERSION =
"0.0.3"
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#nickname ⇒ Object
Returns the value of attribute nickname.
-
#port ⇒ Object
Returns the value of attribute port.
-
#realname ⇒ Object
Returns the value of attribute realname.
-
#server ⇒ Object
Returns the value of attribute server.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Zircon
constructor
A new instance of Zircon.
- #run! ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Zircon
Returns a new instance of Zircon.
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/zircon.rb', line 61 def initialize(args = {}) @server = args[:server] @port = args[:port] @channel = args[:channel] @password = args[:password] @username = args[:username] @nickname = args[:nickname] || @username @realname = args[:realname] || @username on_ping { || pong(.text) } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Zircon::Callback
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
9 10 11 |
# File 'lib/zircon.rb', line 9 def channel @channel end |
#nickname ⇒ Object
Returns the value of attribute nickname.
9 10 11 |
# File 'lib/zircon.rb', line 9 def nickname @nickname end |
#port ⇒ Object
Returns the value of attribute port.
9 10 11 |
# File 'lib/zircon.rb', line 9 def port @port end |
#realname ⇒ Object
Returns the value of attribute realname.
9 10 11 |
# File 'lib/zircon.rb', line 9 def realname @realname end |
#server ⇒ Object
Returns the value of attribute server.
9 10 11 |
# File 'lib/zircon.rb', line 9 def server @server end |
#username ⇒ Object
Returns the value of attribute username.
9 10 11 |
# File 'lib/zircon.rb', line 9 def username @username end |
Instance Method Details
#run! ⇒ Object
72 73 74 75 |
# File 'lib/zircon.rb', line 72 def run! login end |