lib/command.rb in dev_commands-0.0.39 vs lib/command.rb in dev_commands-0.0.40

- old
+ new

@@ -33,10 +33,14 @@ def quiet? (self.has_key?(:quiet) && self[:quiet]) end - def execute + def execute value=nil + + if(!value.nil? && value.is_a?(Hash)) + value.each{|k,v|self[k]=v} + end pwd=Dir.pwd Dir.chdir(self[:directory]) if(self.has_key?(:directory) && File.exists?(self[:directory])) self[:directory] = pwd if(self[:directory].length==0) if(self[:timeout] > 0) puts "#{self[:input]} (#{self[:directory]}) timeout #{self[:timeout].to_s}" if(!quiet?) \ No newline at end of file