Sha256: c0bb73ea486df569db3c6c985d02be5fdc235ad55a4423bac9667bf5871b6f61
Contents?: true
Size: 565 Bytes
Versions: 21
Compression:
Stored size: 565 Bytes
Contents
class Array def execute i=0 while i < self.length self[i]=Command.new(self[i]) if(self[i].is_a?(String)) self[i]=Command.new(self[i]) if(self[i].is_a?(Hash) && !self[i].is_a?(Command)) self[i].execute if(self[i].is_a?(Command)) i=i+1 end end def add command self << command if(!include?(command)) end 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 end
Version data entries
21 entries across 21 versions & 1 rubygems