Class: PgQuery::FingerprintSubHash

Inherits:
Object
  • Object
show all
Defined in:
lib/pg_query/fingerprint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFingerprintSubHash

Returns a new instance of FingerprintSubHash.



17
18
19
# File 'lib/pg_query/fingerprint.rb', line 17

def initialize
  @parts = []
end

Instance Attribute Details

#partsObject (readonly)

Returns the value of attribute parts.



15
16
17
# File 'lib/pg_query/fingerprint.rb', line 15

def parts
  @parts
end

Instance Method Details

#flush_to(hash) ⇒ Object



25
26
27
28
29
# File 'lib/pg_query/fingerprint.rb', line 25

def flush_to(hash)
  parts.each do |part|
    hash.update part
  end
end

#update(part) ⇒ Object



21
22
23
# File 'lib/pg_query/fingerprint.rb', line 21

def update(part)
  @parts << part
end