Class: Pacer::Filter::SectionFilter::FilterSectionPipe
- Inherits:
-
Pipes::RubyPipe
- Object
- AbstractPipe
- Pipes::RubyPipe
- Pacer::Filter::SectionFilter::FilterSectionPipe
- Defined in:
- lib/pacer/filter/object_filter.rb
Instance Attribute Summary collapse
-
#negate ⇒ Object
readonly
Returns the value of attribute negate.
-
#other ⇒ Object
Returns the value of attribute other.
-
#section ⇒ Object
readonly
Returns the value of attribute section.
Attributes inherited from Pipes::RubyPipe
Instance Method Summary collapse
-
#initialize(section, negate) ⇒ FilterSectionPipe
constructor
A new instance of FilterSectionPipe.
- #on_raw_element(x) ⇒ Object
- #processNextStart ⇒ Object
- #reset ⇒ Object
Methods inherited from Pipes::RubyPipe
Constructor Details
#initialize(section, negate) ⇒ FilterSectionPipe
Returns a new instance of FilterSectionPipe.
77 78 79 80 81 82 |
# File 'lib/pacer/filter/object_filter.rb', line 77 def initialize(section, negate) super() @section = section @negate = negate section.visitor = self if section end |
Instance Attribute Details
#negate ⇒ Object (readonly)
Returns the value of attribute negate.
74 75 76 |
# File 'lib/pacer/filter/object_filter.rb', line 74 def negate @negate end |
#other ⇒ Object
Returns the value of attribute other.
75 76 77 |
# File 'lib/pacer/filter/object_filter.rb', line 75 def other @other end |
#section ⇒ Object (readonly)
Returns the value of attribute section.
74 75 76 |
# File 'lib/pacer/filter/object_filter.rb', line 74 def section @section end |
Instance Method Details
#on_raw_element(x) ⇒ Object
98 99 100 |
# File 'lib/pacer/filter/object_filter.rb', line 98 def on_raw_element(x) self.other = x end |
#processNextStart ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/pacer/filter/object_filter.rb', line 84 def processNextStart value = starts.next if negate while value == other value = starts.next end else while value != other value = starts.next end end value end |
#reset ⇒ Object
102 103 104 105 |
# File 'lib/pacer/filter/object_filter.rb', line 102 def reset self.other = nil super end |