lib/resource_kit/action.rb in resource_kit-0.0.3 vs lib/resource_kit/action.rb in resource_kit-0.0.5

- old
+ new

@@ -4,19 +4,25 @@ def initialize(name, verb = nil, path = nil) @name = name @verb = (verb && verb.downcase.to_sym) || :get @path = path + @query_keys = [] end def verb(v = nil) @verb = v if v @verb end def path(path = nil) @path = path if path @path + end + + def query_keys(*keys) + return @query_keys if keys.empty? + @query_keys += keys end def handlers @handlers ||= {} end \ No newline at end of file