Class: Dhaka::ClosureHash
- Inherits:
-
Hash
- Object
- Hash
- Dhaka::ClosureHash
- Defined in:
- lib/dhaka/grammar/closure_hash.rb
Overview
A subclass of Hash with a dirty flag
Instance Attribute Summary collapse
-
#dirty ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#initialize ⇒ ClosureHash
constructor
A new instance of ClosureHash.
- #load_set(set) ⇒ Object
Constructor Details
#initialize ⇒ ClosureHash
Returns a new instance of ClosureHash.
6 7 8 9 |
# File 'lib/dhaka/grammar/closure_hash.rb', line 6 def initialize super @dirty = false end |
Instance Attribute Details
#dirty ⇒ Object
:nodoc:
4 5 6 |
# File 'lib/dhaka/grammar/closure_hash.rb', line 4 def dirty @dirty end |
Instance Method Details
#load_set(set) ⇒ Object
11 12 13 |
# File 'lib/dhaka/grammar/closure_hash.rb', line 11 def load_set(set) set.each {|item| self[item] = item} end |