Sha256: 9afdfee2fa3a62975e307c19ad5c1ec9e1db199e751c40320ebae47781116ff7

Contents?: true

Size: 537 Bytes

Versions: 45

Compression:

Stored size: 537 Bytes

Contents

puts __FILE__ if defined?(DEBUG)

class Hash
	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
	def to_html
      [
      	'<div>',
        map { |k, v| ["<br/><div><strong>#{k}</strong>", v.respond_to?(:to_html) ? v.to_html : "<span>#{v}</span></div><br/>"] },
        '</div>'
      ].join
    end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
dev-2.0.194 lib/base/hash.rb
dev-2.0.193 lib/base/hash.rb
dev-2.0.192 lib/base/hash.rb
dev-2.0.191 lib/base/hash.rb
dev-2.0.190 lib/base/hash.rb
dev-2.0.189 lib/base/hash.rb
dev-2.0.188 lib/base/hash.rb
dev-2.0.187 lib/base/hash.rb
dev-2.0.186 lib/base/hash.rb
dev-2.0.185 lib/base/hash.rb
dev-2.0.184 lib/base/hash.rb
dev-2.0.183 lib/base/hash.rb
dev-2.0.182 lib/base/hash.rb
dev-2.0.181 lib/base/hash.rb
dev-2.0.180 lib/base/hash.rb
dev-2.0.179 lib/base/hash.rb
dev-2.0.178 lib/base/hash.rb
dev-2.0.177 lib/base/hash.rb
dev-2.0.176 lib/base/hash.rb
dev-2.0.175 lib/base/hash.rb