lib/mothership/inputs.rb in mothership-0.0.1 vs lib/mothership/inputs.rb in mothership-0.0.2

- old
+ new

@@ -19,9 +19,18 @@ def merge(inputs) self.class.new(@command, @context, @inputs.merge(inputs)) end + def without(*names) + inputs = @inputs.dup + names.each do |n| + inputs.delete(n) + end + + self.class.new(@command, @context, inputs) + end + def [](name, *args) return @inputs[name] if @inputs.key?(name) && @inputs[name] != [] return @cache[name] if @cache.key? name meta = @command.inputs[name]