Class: Factor::Connector::Instance
- Inherits:
-
Object
- Object
- Factor::Connector::Instance
show all
- Defined in:
- lib/instances/instance.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(options = {}) ⇒ Instance
Returns a new instance of Instance.
10
11
12
|
# File 'lib/instances/instance.rb', line 10
def initialize(options = {})
@definition = options[:definition] if options[:definition]
end
|
Instance Attribute Details
#callback ⇒ Object
Returns the value of attribute callback.
8
9
10
|
# File 'lib/instances/instance.rb', line 8
def callback
@callback
end
|
#definition ⇒ Object
Returns the value of attribute definition.
8
9
10
|
# File 'lib/instances/instance.rb', line 8
def definition
@definition
end
|
#instance_id ⇒ Object
Returns the value of attribute instance_id.
8
9
10
|
# File 'lib/instances/instance.rb', line 8
def instance_id
@instance_id
end
|
Instance Method Details
#debug(message) ⇒ Object
38
39
40
|
# File 'lib/instances/instance.rb', line 38
def debug(message)
log 'debug', message
end
|
#error(message) ⇒ Object
30
31
32
|
# File 'lib/instances/instance.rb', line 30
def error(message)
log 'error', message
end
|
#id ⇒ Object
22
23
24
|
# File 'lib/instances/instance.rb', line 22
def id
@definition.id
end
|
#info(message) ⇒ Object
26
27
28
|
# File 'lib/instances/instance.rb', line 26
def info(message)
log 'info', message
end
|
#log(status, message) ⇒ Object
42
43
44
|
# File 'lib/instances/instance.rb', line 42
def log(status, message)
respond type: 'log', status: status, message: message
end
|
#respond(params) ⇒ Object
18
19
20
|
# File 'lib/instances/instance.rb', line 18
def respond(params)
@callback.call(params) if @callback
end
|
#warn(message) ⇒ Object
34
35
36
|
# File 'lib/instances/instance.rb', line 34
def warn(message)
log 'warn', message
end
|