Sha256: f3f6698e2d7af7f34197679b237b678a9614860541e05c5fd8cf32f17fbb4a3c

Contents?: true

Size: 589 Bytes

Versions: 13

Compression:

Stored size: 589 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

13 entries across 13 versions & 1 rubygems

Version Path
dev_commands-0.0.33 lib/array.rb
dev_commands-0.0.32 lib/array.rb
dev_commands-0.0.31 lib/array.rb
dev_commands-0.0.30 lib/array.rb
dev_commands-0.0.29 lib/array.rb
dev_commands-0.0.28 lib/array.rb
dev_commands-0.0.27 lib/array.rb
dev_commands-0.0.26 lib/array.rb
dev_commands-0.0.22 lib/array.rb
dev_commands-0.0.21 lib/array.rb
dev_commands-0.0.20 lib/array.rb
dev_commands-0.0.19 lib/array.rb
dev_commands-0.0.18 lib/array.rb