Permalink
Browse files

Merge pull request #79 from kytrinyx/eradicate-meth

Don't abbreviate method to meth
  • Loading branch information...
2 parents d0b30fb + 7e8d1c6 commit a7a7acdcbd5c51388633a98471d6f7506cce4712 @TrevorBramble TrevorBramble committed Jan 1, 2013
Showing with 9 additions and 9 deletions.
  1. +2 −2 lib/sinatra/contrib/setup.rb
  2. +2 −2 lib/sinatra/namespace.rb
  3. +5 −5 lib/sinatra/respond_with.rb
@@ -24,9 +24,9 @@ def autoload(name, path = nil, method = nil)
end
def registered(base)
- @extensions.each do |meth, list|
+ @extensions.each do |method, list|
list = list.map { |name| Sinatra.const_get name }
- base.send(meth, *list) unless base == ::Sinatra::Application
+ base.send(method, *list) unless base == ::Sinatra::Application
end
end
end
View
@@ -262,8 +262,8 @@ def prefixed(method, pattern = nil, conditions = {}, &block)
result
end
- def method_missing(meth, *args, &block)
- base.send(meth, *args, &block)
+ def method_missing(method, *args, &block)
+ base.send(method, *args, &block)
end
end
@@ -118,9 +118,9 @@ def finish
@app.halt 406
end
- def method_missing(meth, *args, &block)
- return super if args.any? or block.nil? or not @app.mime_type(meth)
- on(meth, &block)
+ def method_missing(method, *args, &block)
+ return super if args.any? or block.nil? or not @app.mime_type(method)
+ on(method, &block)
end
end
@@ -148,8 +148,8 @@ def respond_with(template, object = nil, &block)
if object
exts.each do |ext|
halt json(object) if ext == :json
- next unless object.respond_to? meth = "to_#{ext}"
- halt(*object.send(meth))
+ next unless object.respond_to? method = "to_#{ext}"
+ halt(*object.send(method))
end
end
false

0 comments on commit a7a7acd

Please sign in to comment.