Module: WhoIsIt

Defined in:
lib/who_is_it.rb,
lib/who_is_it/base.rb,
lib/who_is_it/ohloh.rb,
lib/who_is_it/flickr.rb,
lib/who_is_it/github.rb,
lib/who_is_it/twitter.rb,
lib/who_is_it/youtube.rb

Defined Under Namespace

Classes: Base, Flickr, Github, Ohloh, Twitter, Youtube

Class Method Summary collapse

Class Method Details

.service_for(net, username, opts = {}) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/who_is_it.rb', line 20

def self.service_for(net, username, opts = {})
  case net.to_s
  when "youtube"
    WhoIsIt::Youtube.new(username, opts)
  when "github"
    WhoIsIt::Github.new(username, opts)
  when "flickr"
    WhoIsIt::Flickr.new(username, opts)
  when "twitter"
    WhoIsIt::Twitter.new(username, opts)
  when "ohloh"
    WhoIsIt::Ohloh.new(username, opts)
  else
    raise ArgumentError, "unknown service: #{net}"
  end
end

.tags_for(net, username, opts = {}) ⇒ Object



15
16
17
18
# File 'lib/who_is_it.rb', line 15

def self.tags_for(net, username, opts = {})
  service = self.service_for(net, username, opts)
  service ? service.tags : []
end