Class: Gemathon::List
- Inherits:
-
Object
- Object
- Gemathon::List
- Defined in:
- lib/gemathon/list.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#org_name ⇒ Object
readonly
Returns the value of attribute org_name.
Instance Method Summary collapse
-
#initialize(connection, org_name, options = {}) ⇒ List
constructor
A new instance of List.
- #list ⇒ Object
Constructor Details
#initialize(connection, org_name, options = {}) ⇒ List
Returns a new instance of List.
7 8 9 10 |
# File 'lib/gemathon/list.rb', line 7 def initialize connection, org_name, = {} @org_name = org_name @connection = connection end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
6 7 8 |
# File 'lib/gemathon/list.rb', line 6 def connection @connection end |
#org_name ⇒ Object (readonly)
Returns the value of attribute org_name.
6 7 8 |
# File 'lib/gemathon/list.rb', line 6 def org_name @org_name end |
Instance Method Details
#list ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/gemathon/list.rb', line 12 def list @list_repos=[] hsh_details= {} @org_name.each do |org_name| @list_repos=@connection.repos.list(auto_pagination: true,user:org_name) @list_repos.map(&:name).each do |repo| repo_details=@connection.repos.get(org_name,repo) hsh_details[repo]={:description=>repo_details["description"],:url=>repo_details["html_url"],:language=>repo_details["language"]} end end hsh_details end |