Permalink
Browse files

Remove explicit receiver where unnecessary

  • Loading branch information...
1 parent 9646a5b commit 3e8c4ac7b50ba08e26d04c14e67b0ae468aabd7c @sferik committed Oct 18, 2012
Showing with 4 additions and 7 deletions.
  1. +1 −4 lib/twitter/base.rb
  2. +2 −2 lib/twitter/geo/point.rb
  3. +1 −1 lib/twitter/request/multipart_with_file.rb
View
@@ -8,10 +8,7 @@ class Base
# Define methods that retrieve the value from an initialized instance variable Hash, using the attribute as a key
#
- # @overload self.attr_reader(attr)
- # @param attr [Symbol]
- # @overload self.attr_reader(attrs)
- # @param attrs [Array<Symbol>]
+ # @param attrs [Array, Set, Symbol]
def self.attr_reader(*attrs)
attrs.each do |attribute|
class_eval do
View
@@ -6,13 +6,13 @@ class Point < Twitter::Geo
# @return [Integer]
def latitude
- self.coordinates[0]
+ coordinates[0]
end
alias lat latitude
# @return [Integer]
def longitude
- self.coordinates[1]
+ coordinates[1]
end
alias long longitude
alias lng longitude
@@ -6,8 +6,8 @@ class MultipartWithFile < Faraday::Middleware
CONTENT_TYPE = 'Content-Type'.freeze
class << self
attr_accessor :mime_type
+ mime_type = 'multipart/form-data'.freeze
end
- self.mime_type = 'multipart/form-data'.freeze
def call(env)
if env[:body].is_a?(Hash)

0 comments on commit 3e8c4ac

Please sign in to comment.