Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/hash.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
2 3 4 5 6 |
# File 'lib/hash.rb', line 2 def execute self.each{|k,v| v.execute if v.respond_to?(:execute) } end |
#to_html ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/hash.rb', line 7 def to_html [ '<ul>', map { |k, v| ["<li><strong>#{k}</strong>", v.respond_to?(:to_html) ? v.to_html : "<span>#{v}</span></li>"] }, '</ul>' ].join end |