lib/usher/interface/email.rb in usher-0.6.3 vs lib/usher/interface/email.rb in usher-0.6.4

- old
+ new

@@ -1,14 +1,14 @@ class Usher module Interface class Email - + def initialize(&blk) @routes = Usher.new(:delimiters => ['@', '-', '.'], :valid_regex => '[\+a-zA-Z0-9]+') instance_eval(&blk) if blk end - + def for(path, &block) @routes.add_route(path).to(block) end def reset! @@ -16,12 +16,12 @@ end def act(email) response = @routes.recognize(email, email) if response.path - response.path.route.destination.call(response.params.inject({}){|h,(k,v)| h[k]=v.to_s; h }) + response.path.route.destination.call(response.params_as_hash) end end end end -end \ No newline at end of file +end