Class: PgQuery::FingerprintSubHash
- Inherits:
-
Object
- Object
- PgQuery::FingerprintSubHash
- Defined in:
- lib/pg_query/fingerprint.rb
Instance Attribute Summary collapse
-
#parts ⇒ Object
readonly
Returns the value of attribute parts.
Instance Method Summary collapse
- #flush_to(hash) ⇒ Object
-
#initialize ⇒ FingerprintSubHash
constructor
A new instance of FingerprintSubHash.
- #update(part) ⇒ Object
Constructor Details
#initialize ⇒ FingerprintSubHash
Returns a new instance of FingerprintSubHash.
17 18 19 |
# File 'lib/pg_query/fingerprint.rb', line 17 def initialize @parts = [] end |
Instance Attribute Details
#parts ⇒ Object (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 |