Module: ShareChecker

Defined in:
lib/share_checker.rb,
lib/share_checker/config.rb,
lib/share_checker/version.rb,
lib/share_checker/provider.rb,
lib/share_checker/providers/twitter.rb,
lib/share_checker/providers/facebook.rb,
lib/share_checker/providers/vkontakte.rb,
lib/share_checker/providers/tweetracker.rb,
lib/share_checker/providers/odnoklassniki.rb

Defined Under Namespace

Modules: Providers Classes: Config, Provider

Constant Summary collapse

VERSION =
"0.1.7".freeze
@@config =
Config.new

Class Method Summary collapse

Class Method Details

.check(*args) ⇒ Object



42
43
44
# File 'lib/share_checker.rb', line 42

def self.check(*args)
  provider(*args).check
end

.provider(provider, url, options = {}) ⇒ Object



46
47
48
49
# File 'lib/share_checker.rb', line 46

def self.provider(provider, url, options = {})
  options = (config.send(provider) || {}).merge(options)
  Providers.get(provider).new(url, provider, options)
end

.setup {|config| ... } ⇒ Object

Class methods

Yields:

  • (config)


38
39
40
# File 'lib/share_checker.rb', line 38

def self.setup(&block)
  yield config
end