Class: GithubSearch::User

Inherits:
Searcher show all
Defined in:
lib/github-search/user.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Searcher

#issues, #repos, #search, #users

Constructor Details

#initialize(attributes) ⇒ User

Returns a new instance of User.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/github-search/user.rb', line 25

def initialize(attributes)
  @id                     = attributes["id"]
  @login                  = attributes["login"]
  @avatar_url             = attributes["avatar_url"]
  @gravatar_id            = attributes["gravatar_id"]
  @url                    = attributes["url"]
  @html_url               = attributes["html_url"]
  @followers_url          = attributes["followers_url"]
  @following_url          = attributes["following_url"]
  @gists_url              = attributes["gists_url"]
  @starred_url            = attributes["starred_url"]
  @subscriptions_url      = attributes["subscriptions_url"]
  @organizations_url      = attributes["organizations_url"]
  @repos_url              = attributes["repos_url"]
  @events_url             = attributes["events_url"]
  @received_events_url    = attributes["received_events_url"]
  @type                   = attributes["type"]
  @site_admin             = attributes["site_admin"]
  @score                  = attributes["score"]
end

Instance Attribute Details

#avatar_urlObject (readonly)

Returns the value of attribute avatar_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def avatar_url
  @avatar_url
end

#events_urlObject (readonly)

Returns the value of attribute events_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def events_url
  @events_url
end

#followers_urlObject (readonly)

Returns the value of attribute followers_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def followers_url
  @followers_url
end

#following_urlObject (readonly)

Returns the value of attribute following_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def following_url
  @following_url
end

#gists_urlObject (readonly)

Returns the value of attribute gists_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def gists_url
  @gists_url
end

#gravatar_idObject (readonly)

Returns the value of attribute gravatar_id.



6
7
8
# File 'lib/github-search/user.rb', line 6

def gravatar_id
  @gravatar_id
end

#html_urlObject (readonly)

Returns the value of attribute html_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def html_url
  @html_url
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/github-search/user.rb', line 6

def id
  @id
end

#loginObject (readonly)

Returns the value of attribute login.



6
7
8
# File 'lib/github-search/user.rb', line 6

def 
  @login
end

#organizations_urlObject (readonly)

Returns the value of attribute organizations_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def organizations_url
  @organizations_url
end

#received_events_urlObject (readonly)

Returns the value of attribute received_events_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def received_events_url
  @received_events_url
end

#repos_urlObject (readonly)

Returns the value of attribute repos_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def repos_url
  @repos_url
end

#scoreObject (readonly)

Returns the value of attribute score.



6
7
8
# File 'lib/github-search/user.rb', line 6

def score
  @score
end

#site_adminObject (readonly)

Returns the value of attribute site_admin.



6
7
8
# File 'lib/github-search/user.rb', line 6

def site_admin
  @site_admin
end

#starred_urlObject (readonly)

Returns the value of attribute starred_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def starred_url
  @starred_url
end

#subscriptions_urlObject (readonly)

Returns the value of attribute subscriptions_url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def subscriptions_url
  @subscriptions_url
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/github-search/user.rb', line 6

def type
  @type
end

#urlObject (readonly)

Returns the value of attribute url.



6
7
8
# File 'lib/github-search/user.rb', line 6

def url
  @url
end

Class Method Details

.sort_optionsObject



46
47
48
# File 'lib/github-search/user.rb', line 46

def self.sort_options
  [:followers, :repositories, :joined]
end