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
Class Method Summary collapse
- .check(*args) ⇒ Object
- .provider(provider, url, options = {}) ⇒ Object
-
.setup {|config| ... } ⇒ Object
Class methods.
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, = {}) = (config.send(provider) || {}).merge() Providers.get(provider).new(url, provider, ) end |
.setup {|config| ... } ⇒ Object
Class methods
38 39 40 |
# File 'lib/share_checker.rb', line 38 def self.setup(&block) yield config end |