Class: Mamiya::Agent::Handlers::Abstract
- Inherits:
-
Object
- Object
- Mamiya::Agent::Handlers::Abstract
- Defined in:
- lib/mamiya/agent/handlers/abstract.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Instance Method Summary collapse
-
#initialize(agent, event) ⇒ Abstract
constructor
A new instance of Abstract.
- #run! ⇒ Object
Constructor Details
#initialize(agent, event) ⇒ Abstract
Returns a new instance of Abstract.
7 8 9 10 11 |
# File 'lib/mamiya/agent/handlers/abstract.rb', line 7 def initialize(agent, event) @agent = agent @event = event @payload = (event.payload && !event.payload.empty?) ? JSON.parse(event.payload) : {} end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
13 14 15 |
# File 'lib/mamiya/agent/handlers/abstract.rb', line 13 def agent @agent end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
13 14 15 |
# File 'lib/mamiya/agent/handlers/abstract.rb', line 13 def event @event end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
13 14 15 |
# File 'lib/mamiya/agent/handlers/abstract.rb', line 13 def payload @payload end |
Instance Method Details
#run! ⇒ Object
15 16 |
# File 'lib/mamiya/agent/handlers/abstract.rb', line 15 def run! end |