Class: PgQuery::ParserResult::FingerprintSubHash
- Inherits:
-
Object
- Object
- PgQuery::ParserResult::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.
19 20 21 |
# File 'lib/pg_query/fingerprint.rb', line 19 def initialize @parts = [] end |
Instance Attribute Details
#parts ⇒ Object (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 |