Class: FFWD::Core::Emitter
- Inherits:
-
Object
- Object
- FFWD::Core::Emitter
- Defined in:
- lib/ffwd/core/emitter.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#metric ⇒ Object
readonly
Returns the value of attribute metric.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event, metric) ⇒ Emitter
constructor
A new instance of Emitter.
Constructor Details
#initialize(event, metric) ⇒ Emitter
Returns a new instance of Emitter.
31 32 33 34 |
# File 'lib/ffwd/core/emitter.rb', line 31 def initialize event, metric @event = event @metric = metric end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
23 24 25 |
# File 'lib/ffwd/core/emitter.rb', line 23 def event @event end |
#metric ⇒ Object (readonly)
Returns the value of attribute metric.
23 24 25 |
# File 'lib/ffwd/core/emitter.rb', line 23 def metric @metric end |
Class Method Details
.build(output, opts = {}) ⇒ Object
25 26 27 28 29 |
# File 'lib/ffwd/core/emitter.rb', line 25 def self.build output, opts={} event = EventEmitter.build output, opts, opts[:event] || {} metric = MetricEmitter.build output, opts, opts[:metric] || {} new(event, metric) end |