Class: Summer::Connection
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#port ⇒ Object
Returns the value of attribute port.
-
#ready ⇒ Object
Returns the value of attribute ready.
-
#server ⇒ Object
Returns the value of attribute server.
-
#started ⇒ Object
Returns the value of attribute started.
Instance Method Summary collapse
-
#initialize(server, port = 6667, dry = false) ⇒ Connection
constructor
A new instance of Connection.
Methods included from Handlers
Constructor Details
#initialize(server, port = 6667, dry = false) ⇒ Connection
Returns a new instance of Connection.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/summer.rb', line 14 def initialize(server, port=6667, dry=false) @ready = false @started = false @server = server @port = port load_config connect! unless dry loop do startup! if @ready && !@started = @connection.gets if parse() else break end end end end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
13 14 15 |
# File 'lib/summer.rb', line 13 def config @config end |
#connection ⇒ Object
Returns the value of attribute connection.
13 14 15 |
# File 'lib/summer.rb', line 13 def connection @connection end |
#port ⇒ Object
Returns the value of attribute port.
13 14 15 |
# File 'lib/summer.rb', line 13 def port @port end |
#ready ⇒ Object
Returns the value of attribute ready.
13 14 15 |
# File 'lib/summer.rb', line 13 def ready @ready end |
#server ⇒ Object
Returns the value of attribute server.
13 14 15 |
# File 'lib/summer.rb', line 13 def server @server end |
#started ⇒ Object
Returns the value of attribute started.
13 14 15 |
# File 'lib/summer.rb', line 13 def started @started end |