Class: Liebre::Actor::Context
- Inherits:
-
Object
- Object
- Liebre::Actor::Context
show all
- Defined in:
- lib/liebre/actor/context.rb,
lib/liebre/actor/context/declare.rb,
lib/liebre/actor/context/handler.rb
Defined Under Namespace
Classes: Declare, Handler
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(chan, name, opts, config) ⇒ Context
10
11
12
13
14
15
16
|
# File 'lib/liebre/actor/context.rb', line 10
def initialize chan, name, opts, config
@chan = chan
@name = name
@opts = opts
@config = config
end
|
Instance Attribute Details
#chan ⇒ Object
Returns the value of attribute chan.
8
9
10
|
# File 'lib/liebre/actor/context.rb', line 8
def chan
@chan
end
|
#name ⇒ Object
Returns the value of attribute name.
8
9
10
|
# File 'lib/liebre/actor/context.rb', line 8
def name
@name
end
|
#opts ⇒ Object
Returns the value of attribute opts.
8
9
10
|
# File 'lib/liebre/actor/context.rb', line 8
def opts
@opts
end
|
Instance Method Details
#declare ⇒ Object
22
23
24
|
# File 'lib/liebre/actor/context.rb', line 22
def declare
@declare ||= Declare.new(chan)
end
|
#handler ⇒ Object
26
27
28
|
# File 'lib/liebre/actor/context.rb', line 26
def handler
@handler ||= Handler.new(opts)
end
|
#logger ⇒ Object
30
31
32
|
# File 'lib/liebre/actor/context.rb', line 30
def logger
config.logger
end
|
#spec ⇒ Object
18
19
20
|
# File 'lib/liebre/actor/context.rb', line 18
def spec
opts.fetch(:resources, {})
end
|