lib/array.rb in dev_commands-0.0.10 vs lib/array.rb in dev_commands-0.0.11
- old
+ new
@@ -7,9 +7,13 @@
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)
\ No newline at end of file