Class: PgShrink::TableSanitizer

Inherits:
Object
  • Object
show all
Defined in:
lib/pg_shrink/table_sanitizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table, opts, &block) ⇒ TableSanitizer

Returns a new instance of TableSanitizer.



4
5
6
7
8
# File 'lib/pg_shrink/table_sanitizer.rb', line 4

def initialize(table, opts, &block)
  self.table = table
  @opts = opts # Currently not used, but who knows
  @block = block
end

Instance Attribute Details

#tableObject

Returns the value of attribute table.



3
4
5
# File 'lib/pg_shrink/table_sanitizer.rb', line 3

def table
  @table
end

Instance Method Details

#apply(hash) ⇒ Object



10
11
12
# File 'lib/pg_shrink/table_sanitizer.rb', line 10

def apply(hash)
  @block.call(hash)
end