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