Class: Hubba::Folio::Repo
- Inherits:
-
Object
- Object
- Hubba::Folio::Repo
- Defined in:
- lib/hubba/reports/folio.rb
Overview
(nested) class
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
Instance Method Summary collapse
- #diff ⇒ Object
- #full_name ⇒ Object
-
#initialize(owner, name) ⇒ Repo
constructor
A new instance of Repo.
- #stats ⇒ Object
Constructor Details
#initialize(owner, name) ⇒ Repo
Returns a new instance of Repo.
9 10 11 12 |
# File 'lib/hubba/reports/folio.rb', line 9 def initialize( owner, name ) @owner = owner ## rename to login, username - why? why not? @name = name ## rename to reponame ?? end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/hubba/reports/folio.rb', line 6 def name @name end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
6 7 8 |
# File 'lib/hubba/reports/folio.rb', line 6 def owner @owner end |
Instance Method Details
#diff ⇒ Object
25 26 27 |
# File 'lib/hubba/reports/folio.rb', line 25 def diff @diff ||= stats.calc_diff_stars( samples: 3, days: 30 ) end |
#full_name ⇒ Object
14 |
# File 'lib/hubba/reports/folio.rb', line 14 def full_name() "#{owner}/#{name}"; end |
#stats ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/hubba/reports/folio.rb', line 16 def stats ## note: load stats on demand only (first access) for now - why? why not? @stats ||= begin stats = Stats.new( full_name ) stats.read stats end end |