Sha256: 4ae9e1c5573e2e8ba9e6ed77a3e588bd04569817299c826c1dcb475aa4c12c1c

Contents?: true

Size: 503 Bytes

Versions: 251

Compression:

Stored size: 503 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
	  	  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

251 entries across 251 versions & 1 rubygems

Version Path
dev-2.1.67 lib/base/hash.rb
dev-2.1.66 lib/base/hash.rb
dev-2.1.65 lib/base/hash.rb
dev-2.1.64 lib/base/hash.rb
dev-2.1.63 lib/base/hash.rb
dev-2.1.62 lib/base/hash.rb
dev-2.1.61 lib/base/hash.rb
dev-2.1.60 lib/base/hash.rb
dev-2.1.59 lib/base/hash.rb
dev-2.1.58 lib/base/hash.rb
dev-2.1.57 lib/base/hash.rb
dev-2.1.56 lib/base/hash.rb
dev-2.1.55 lib/base/hash.rb
dev-2.1.54 lib/base/hash.rb
dev-2.1.53 lib/base/hash.rb
dev-2.1.52 lib/base/hash.rb
dev-2.1.51 lib/base/hash.rb
dev-2.1.50 lib/base/hash.rb
dev-2.1.49 lib/base/hash.rb
dev-2.1.48 lib/base/hash.rb