Class: Leonidas::App::Connection
- Inherits:
-
Object
- Object
- Leonidas::App::Connection
- Includes:
- Commands::Aggregator
- Defined in:
- lib/leonidas/app/connection.rb
Instance Attribute Summary collapse
-
#active_commands ⇒ Object
readonly
Returns the value of attribute active_commands.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_update ⇒ Object
Returns the value of attribute last_update.
Instance Method Summary collapse
-
#initialize ⇒ Connection
constructor
A new instance of Connection.
Methods included from Commands::Aggregator
#add_command!, #add_commands!, #commands_since, #commands_through, #deactivate_commands!
Constructor Details
#initialize ⇒ Connection
Returns a new instance of Connection.
10 11 12 13 14 15 |
# File 'lib/leonidas/app/connection.rb', line 10 def initialize @id = SecureRandom.uuid @last_update = Time.now.to_i @active_commands = [ ] @inactive_commands = [ ] end |
Instance Attribute Details
#active_commands ⇒ Object (readonly)
Returns the value of attribute active_commands.
7 8 9 |
# File 'lib/leonidas/app/connection.rb', line 7 def active_commands @active_commands end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/leonidas/app/connection.rb', line 7 def id @id end |
#last_update ⇒ Object
Returns the value of attribute last_update.
8 9 10 |
# File 'lib/leonidas/app/connection.rb', line 8 def last_update @last_update end |