Module: StackAgent
- Defined in:
- lib/stack-agent.rb,
lib/stack-agent/cli.rb,
lib/stack-agent/instance.rb,
lib/stack-agent/configuration.rb
Defined Under Namespace
Classes: Cli, Configuration, Instance
Constant Summary
collapse
- VERSION =
'0.1.3'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Method Details
19
20
21
|
# File 'lib/stack-agent.rb', line 19
def self.configure
yield(configuration)
end
|
.connect! ⇒ Object
33
34
35
36
37
38
39
|
# File 'lib/stack-agent.rb', line 33
def self.connect!
register
at_exit do
unregister
end
end
|
.register ⇒ Object
23
24
25
26
|
# File 'lib/stack-agent.rb', line 23
def self.register
@instance = StackAgent::Instance.new
puts "Registered Stack #{@instance.instance_token}" if @instance.register
end
|
.unregister ⇒ Object
28
29
30
31
|
# File 'lib/stack-agent.rb', line 28
def self.unregister
return false unless @instance
puts "Unregistered Stack #{@instance.instance_token}" if @instance.unregister
end
|