Class: Leonidas::App::Connection

Inherits:
Object
  • Object
show all
Includes:
Commands::Aggregator
Defined in:
lib/leonidas/app/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Commands::Aggregator

#add_command!, #add_commands!, #commands_since, #commands_through, #deactivate_commands!

Constructor Details

#initializeConnection

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_commandsObject (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

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/leonidas/app/connection.rb', line 7

def id
  @id
end

#last_updateObject

Returns the value of attribute last_update.



8
9
10
# File 'lib/leonidas/app/connection.rb', line 8

def last_update
  @last_update
end