lib/array.rb in dev_commands-0.0.22 vs lib/array.rb in dev_commands-0.0.23
- old
+ new
@@ -1,25 +1,25 @@
-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
+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
\ No newline at end of file