Class: Json::Streamer::Conditions
- Inherits:
-
Object
- Object
- Json::Streamer::Conditions
- Defined in:
- lib/json/streamer/conditions.rb
Instance Attribute Summary collapse
-
#yield_array ⇒ Object
Returns the value of attribute yield_array.
-
#yield_object ⇒ Object
Returns the value of attribute yield_object.
-
#yield_value ⇒ Object
Returns the value of attribute yield_value.
Instance Method Summary collapse
-
#initialize(yield_level: -1,, yield_key: nil) ⇒ Conditions
constructor
A new instance of Conditions.
Constructor Details
#initialize(yield_level: -1,, yield_key: nil) ⇒ Conditions
Returns a new instance of Conditions.
6 7 8 9 10 11 12 13 |
# File 'lib/json/streamer/conditions.rb', line 6 def initialize(yield_level: -1, yield_key: nil) @yield_level = yield_level @yield_key = yield_key @yield_value = ->(aggregator:, value:nil) { yield?(aggregator) } @yield_object = ->(aggregator:, object:nil) { yield?(aggregator) } @yield_array = ->(aggregator:, array:nil) { yield?(aggregator) } end |
Instance Attribute Details
#yield_array ⇒ Object
Returns the value of attribute yield_array.
4 5 6 |
# File 'lib/json/streamer/conditions.rb', line 4 def yield_array @yield_array end |
#yield_object ⇒ Object
Returns the value of attribute yield_object.
4 5 6 |
# File 'lib/json/streamer/conditions.rb', line 4 def yield_object @yield_object end |
#yield_value ⇒ Object
Returns the value of attribute yield_value.
4 5 6 |
# File 'lib/json/streamer/conditions.rb', line 4 def yield_value @yield_value end |