Permalink
Browse files

Use "options" instead of "hash" as argument name

"options" seems to be more descriptive in this case.
  • Loading branch information...
1 parent 827a0fe commit 45b9e0c9777788cc4e55186f4307c2a2233ab406 @dasch committed Aug 28, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 actionpack/lib/action_dispatch/http/upload.rb
@@ -3,11 +3,11 @@ module Http
class UploadedFile
attr_accessor :original_filename, :content_type, :tempfile, :headers
- def initialize(hash)
- @original_filename = encode_filename(hash[:filename])
- @content_type = hash[:type]
- @headers = hash[:head]
- @tempfile = hash[:tempfile]
+ def initialize(options = {})
+ @original_filename = encode_filename(options[:filename])
+ @content_type = options[:type]
+ @headers = options[:head]
+ @tempfile = options[:tempfile]
raise(ArgumentError, ':tempfile is required') unless @tempfile
end

0 comments on commit 45b9e0c

Please sign in to comment.