Class: Hash

Inherits:
Object show all
Defined in:
lib/web/assertinclude.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#__index(key) ⇒ Object



74
75
76
# File 'lib/web/assertinclude.rb', line 74

def __index(key)
	self[key]
end

#compare_includes?(haystack, prefix = []) ⇒ Boolean

Returns:

  • (Boolean)


78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/web/assertinclude.rb', line 78

def compare_includes? haystack, prefix=[]
    message = ""
	# check that haystack is the same type?

	# iterate over your self (particular to self)
	self.each do |k,v|

 # make a sensible name for each element of the needle (particular to self)
 fullname = prefix.clone.push k
 fullname_str = fullname.join(".")
 
 message += do_thing(haystack, k, v, fullname, fullname_str)
	end
	
    message
end