Method: Hash#execute

Defined in:
lib/base/hash.rb

#execute(value = nil) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/base/hash.rb', line 4

def execute value=nil
	  self.each{|k,v|
  v.update if v.respond_to?(:update)
  if(v.is_a?(Array) && v.length==0)
    self.delete k 
  else
    #puts "executing #{k}"

  v.execute(value) if v.respond_to?(:execute)
  end
	  }
end