lib/hash.rb in dev_commands-0.0.54 vs lib/hash.rb in dev_commands-0.0.55
- old
+ new
@@ -1,21 +1,21 @@
-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
+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
\ No newline at end of file