Class: Schlepp::Sink::TableObject::Filter::Observer

Inherits:
Object
  • Object
show all
Defined in:
lib/schlepp/sink/table_object/filter/observer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObserver

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

#countObject (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

#resetObject



16
17
18
# File 'lib/schlepp/sink/table_object/filter/observer.rb', line 16

def reset
  @count = 0
end