Class: Dhaka::ClosureHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/dhaka/grammar/closure_hash.rb

Overview

A subclass of Hash with a dirty flag

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClosureHash

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

#dirtyObject

: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