Sha256: 67da2a29152be80daeef08c4177e0689429de1426488ec1ef0758c9f746caa0e

Contents?: true

Size: 501 Bytes

Versions: 59

Compression:

Stored size: 501 Bytes

Contents

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

59 entries across 59 versions & 2 rubygems

Version Path
dev-2.0.149 lib/base/hash.rb
dev-2.0.148 lib/base/hash.rb
dev-2.0.147 lib/base/hash.rb
dev-2.0.146 lib/base/hash.rb
dev-2.0.145 lib/base/hash.rb
dev-2.0.143 lib/base/hash.rb
dev-2.0.142 lib/hash.rb
dev-2.0.141 lib/hash.rb
dev-2.0.140 lib/hash.rb
dev-2.0.139 lib/commands/hash.rb
dev-2.0.138 lib/commands/hash.rb
dev-2.0.137 lib/commands/hash.rb
dev-2.0.136 lib/commands/hash.rb
dev-2.0.135 lib/commands/hash.rb
dev-2.0.134 lib/commands/hash.rb
dev-2.0.133 lib/commands/hash.rb
dev-2.0.132 lib/commands/hash.rb
dev-2.0.131 lib/commands/hash.rb
dev-2.0.130 lib/commands/hash.rb
dev-2.0.129 lib/commands/hash.rb