# Additional classes to make Fixture behave like a Hash. Required for resolving joins. # # Just off of trivial because the internal data structure for Fixture can be a Hash or # a YAML::Omap class Fixture def has_key?(key) # should work for Hash and Omap @fixture.keys.include?(key) end def each_pair(&block) if @fixture.respond_to?(:each_pair) # for Hash @fixture.each_pair(&block) else # for Omap @fixture.map { |k, v| yield(k,v) } end end def delete_if(&block) # should work for Hash and Omap @fixture.delete_if(&block) end def []=(key, value) @fixture[key] = value end end