Class: GitHubApi::Repository
- Inherits:
-
Struct
- Object
- Struct
- GitHubApi::Repository
- Defined in:
- lib/chid/github_api.rb
Instance Attribute Summary collapse
-
#clone_url ⇒ Object
Returns the value of attribute clone_url.
-
#html_url ⇒ Object
Returns the value of attribute html_url.
-
#language ⇒ Object
Returns the value of attribute language.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#stargazers_count ⇒ Object
Returns the value of attribute stargazers_count.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
Instance Attribute Details
#clone_url ⇒ Object
Returns the value of attribute clone_url
6 7 8 |
# File 'lib/chid/github_api.rb', line 6 def clone_url @clone_url end |
#html_url ⇒ Object
Returns the value of attribute html_url
6 7 8 |
# File 'lib/chid/github_api.rb', line 6 def html_url @html_url end |
#language ⇒ Object
Returns the value of attribute language
6 7 8 |
# File 'lib/chid/github_api.rb', line 6 def language @language end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/chid/github_api.rb', line 6 def name @name end |
#owner ⇒ Object
Returns the value of attribute owner
6 7 8 |
# File 'lib/chid/github_api.rb', line 6 def owner @owner end |
#stargazers_count ⇒ Object
Returns the value of attribute stargazers_count
6 7 8 |
# File 'lib/chid/github_api.rb', line 6 def stargazers_count @stargazers_count end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
6 7 8 |
# File 'lib/chid/github_api.rb', line 6 def updated_at @updated_at end |
Instance Method Details
#summary ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/chid/github_api.rb', line 7 def summary last_activity = updated_at.nil? ? 'unkown' : updated_at.strftime('%a %d %b %Y') print "\n" print "--- Repo name -> #{name} ---" print "\n\n" print "Author #{owner.login}".gray.bold print "\n\n" print "Link:\t".gray print "#{html_url}".cyan.underline print "\n\n" print "Link to clone:\t".gray print "#{clone_url}".cyan.underline print "\n\n" print "Write in #{language}".green.bold print "\n\n" print "Stars #{stargazers_count}".cyan.bold print "\n\n" print "Last activity #{last_activity}" print "\n\n" end |