lib/trav3/options.rb in trav3-0.0.4 vs lib/trav3/options.rb in trav3-0.0.5
- old
+ new
@@ -20,11 +20,11 @@
@opts.push(pb[key, value])
end
end
def remove(key)
- @opts = @opts.keep_if {|a, _| (eval ki)[a] }
+ @opts = @opts.keep_if {|a, _| ki[key][a] }
end
def +(other)
raise ArgumentError, "Invalid type provided." unless other.is_a?(Options)
@opts += other.instance_variable_get(:@opts)
@@ -38,10 +38,10 @@
lambda {|param, arg| "#{param}=#{arg}" }
end
private :pb
def ki
- 'lambda {|item| !(/^#{key}=/ === "#{item}") }'
+ lambda {|key| lambda {|item| !(/^#{key}=/ === "#{item}") } }
end
private :ki
end
end