Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Use singleton_class instead of (class << self; self; end)
  • Loading branch information
sferik committed Oct 15, 2011
1 parent 0c337cf commit a1dfa23
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion lib/twitter/cursor.rb
@@ -1,3 +1,4 @@
require 'active_support/core_ext/kernel/singleton_class'
require 'twitter/base'

module Twitter
Expand All @@ -16,7 +17,7 @@ def initialize(cursor, method, klass=nil)
end
@next_cursor = cursor['next_cursor']
@previous_cursor = cursor['previous_cursor']
(class << self; self; end).class_eval do
singleton_class.class_eval do
alias_method method.to_sym, :collection
end
end
Expand Down
24 changes: 12 additions & 12 deletions twitter.gemspec
Expand Up @@ -2,18 +2,18 @@
require File.expand_path('../lib/twitter/version', __FILE__)

Gem::Specification.new do |gem|
gem.add_dependency 'activesupport'
gem.add_dependency 'faraday', '~> 0.7.4'
gem.add_dependency 'multi_json', '~> 1.0.0'
gem.add_dependency 'simple_oauth', '~> 0.1.5'
gem.add_dependency 'twitter-text', '~> 1.4.2'
gem.add_development_dependency 'json', '~> 1.6'
gem.add_development_dependency 'rake', '~> 0.9'
gem.add_development_dependency 'rdiscount', '~> 1.6'
gem.add_development_dependency 'rspec', '~> 2.6'
gem.add_development_dependency 'simplecov', '~> 0.4'
gem.add_development_dependency 'webmock', '~> 1.7'
gem.add_development_dependency 'yard', '~> 0.7'
gem.add_dependency 'activesupport', '~> 3.0'
gem.add_dependency 'faraday', '~> 0.7'
gem.add_dependency 'multi_json', '~> 1.0'
gem.add_dependency 'simple_oauth', '~> 0.1'
gem.add_dependency 'twitter-text', '~> 1.4'
gem.add_development_dependency 'json'
gem.add_development_dependency 'rake'
gem.add_development_dependency 'rdiscount'
gem.add_development_dependency 'rspec'
gem.add_development_dependency 'simplecov'
gem.add_development_dependency 'webmock'
gem.add_development_dependency 'yard'
gem.authors = ["John Nunemaker", "Wynn Netherland", "Erik Michaels-Ober", "Steve Richert"]
gem.description = %q{A Ruby wrapper for the Twitter API.}
gem.email = ['nunemaker@gmail.com', 'wynn.netherland@gmail.com', 'sferik@gmail.com', 'steve.richert@gmail.com']
Expand Down

0 comments on commit a1dfa23

Please sign in to comment.