Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/array.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/array.rb', line 2 def execute i=0 while i < self.length self[i]=Command.new(self[i]) if(self[i].is_a?(String)) self[i].execute if(self[i].is_a?(Command)) i=i+1 end end |
#to_html ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/array.rb', line 11 def to_html html=Array.new html << '<div>' self.each{|e| html << e.to_html if e.respond_to?(:to_html) } html << '</div>' html.join end |