Class: Schlepp::Sink::TableObject::Filter::Observer
- Inherits:
-
Object
- Object
- Schlepp::Sink::TableObject::Filter::Observer
- Defined in:
- lib/schlepp/sink/table_object/filter/observer.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Instance Method Summary collapse
- #add(data) ⇒ Object
-
#initialize ⇒ Observer
constructor
A new instance of Observer.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Observer
Returns a new instance of Observer.
6 7 8 |
# File 'lib/schlepp/sink/table_object/filter/observer.rb', line 6 def initialize reset end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
10 11 12 |
# File 'lib/schlepp/sink/table_object/filter/observer.rb', line 10 def count @count end |
Instance Method Details
#add(data) ⇒ Object
12 13 14 |
# File 'lib/schlepp/sink/table_object/filter/observer.rb', line 12 def add(data) @count += data.length end |
#reset ⇒ Object
16 17 18 |
# File 'lib/schlepp/sink/table_object/filter/observer.rb', line 16 def reset @count = 0 end |