Class: Jetmeter::Config::Flow
- Inherits:
-
Object
- Object
- Jetmeter::Config::Flow
- Defined in:
- lib/jetmeter/config/flow.rb
Instance Attribute Summary collapse
-
#accumulative ⇒ Object
writeonly
Sets the attribute accumulative.
-
#additions ⇒ Object
readonly
Returns the value of attribute additions.
-
#filters ⇒ Object
Returns the value of attribute filters.
-
#substractions ⇒ Object
readonly
Returns the value of attribute substractions.
Instance Method Summary collapse
- #accumulative? ⇒ Boolean
-
#initialize ⇒ Flow
constructor
A new instance of Flow.
- #register_addition(hash) ⇒ Object
- #register_substraction(hash) ⇒ Object
- #transitions(additive) ⇒ Object
Constructor Details
#initialize ⇒ Flow
Returns a new instance of Flow.
9 10 11 12 13 14 |
# File 'lib/jetmeter/config/flow.rb', line 9 def initialize @additions = Hash.new { |hash, key| hash[key] = [] } @substractions = Hash.new { |hash, key| hash[key] = [] } @filters = {} @accumulative = true end |
Instance Attribute Details
#accumulative=(value) ⇒ Object (writeonly)
Sets the attribute accumulative
7 8 9 |
# File 'lib/jetmeter/config/flow.rb', line 7 def accumulative=(value) @accumulative = value end |
#additions ⇒ Object (readonly)
Returns the value of attribute additions.
4 5 6 |
# File 'lib/jetmeter/config/flow.rb', line 4 def additions @additions end |
#filters ⇒ Object
Returns the value of attribute filters.
6 7 8 |
# File 'lib/jetmeter/config/flow.rb', line 6 def filters @filters end |
#substractions ⇒ Object (readonly)
Returns the value of attribute substractions.
5 6 7 |
# File 'lib/jetmeter/config/flow.rb', line 5 def substractions @substractions end |
Instance Method Details
#accumulative? ⇒ Boolean
32 33 34 |
# File 'lib/jetmeter/config/flow.rb', line 32 def accumulative? !!@accumulative end |
#register_addition(hash) ⇒ Object
16 17 18 19 20 |
# File 'lib/jetmeter/config/flow.rb', line 16 def register_addition(hash) hash.each_pair do |key, value| @additions[key] << value end end |
#register_substraction(hash) ⇒ Object
22 23 24 25 26 |
# File 'lib/jetmeter/config/flow.rb', line 22 def register_substraction(hash) hash.each_pair do |key, value| @substractions[key] << value end end |
#transitions(additive) ⇒ Object
28 29 30 |
# File 'lib/jetmeter/config/flow.rb', line 28 def transitions(additive) additive ? additions : substractions end |