Sha256: 2220f0cc2026231731a73537be121a8ff607bec3dc3ea9fa9f5c1dbd96289b67

Contents?: true

Size: 403 Bytes

Versions: 4

Compression:

Stored size: 403 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].execute if(self[i].is_a?(Command))
        i=i+1
      end
    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

4 entries across 4 versions & 1 rubygems

Version Path
dev_commands-0.0.9 lib/array.rb
dev_commands-0.0.8 lib/array.rb
dev_commands-0.0.7 lib/array.rb
dev_commands-0.0.6 lib/array.rb