Class: ProjectHealth::BasicReport
- Inherits:
-
Object
- Object
- ProjectHealth::BasicReport
- Defined in:
- lib/project-health/report/basic.rb
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#last_push ⇒ Object
readonly
Returns the value of attribute last_push.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#stars ⇒ Object
readonly
Returns the value of attribute stars.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(oct, name) ⇒ BasicReport
constructor
A new instance of BasicReport.
- #stats ⇒ Object
Constructor Details
#initialize(oct, name) ⇒ BasicReport
Returns a new instance of BasicReport.
7 8 9 10 11 12 13 14 15 |
# File 'lib/project-health/report/basic.rb', line 7 def initialize(oct, name) @name = name repo = oct.repo(name) @language = repo["language"] @stars = repo["watchers_count"] @created = repo["created_at"] @last_push = repo["pushed_at"] @description = repo["description"] end |
Instance Attribute Details
#created ⇒ Object (readonly)
Returns the value of attribute created.
4 5 6 |
# File 'lib/project-health/report/basic.rb', line 4 def created @created end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/project-health/report/basic.rb', line 4 def description @description end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
4 5 6 |
# File 'lib/project-health/report/basic.rb', line 4 def language @language end |
#last_push ⇒ Object (readonly)
Returns the value of attribute last_push.
4 5 6 |
# File 'lib/project-health/report/basic.rb', line 4 def last_push @last_push end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/project-health/report/basic.rb', line 4 def name @name end |
#stars ⇒ Object (readonly)
Returns the value of attribute stars.
4 5 6 |
# File 'lib/project-health/report/basic.rb', line 4 def stars @stars end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
4 5 6 |
# File 'lib/project-health/report/basic.rb', line 4 def title @title end |
Instance Method Details
#stats ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/project-health/report/basic.rb', line 17 def stats { "Basic" => { "Name" => name, "Description" => description, "Created" => created, "Last push" => last_push, "Language" => language, "Stars" => stars } } end |