Class: PgQuery::ParserResult::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.



19
20
21
# File 'lib/pg_query/fingerprint.rb', line 19

def initialize
  @parts = []
end

Instance Attribute Details

#partsObject (readonly)

Returns the value of attribute parts.



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

def parts
  @parts
end

Instance Method Details

#flush_to(hash) ⇒ Object



27
28
29
30
31
# File 'lib/pg_query/fingerprint.rb', line 27

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

#update(part) ⇒ Object



23
24
25
# File 'lib/pg_query/fingerprint.rb', line 23

def update(part)
  @parts << part
end