Class: Hubba::Summary::Repo
- Inherits:
-
Object
- Object
- Hubba::Summary::Repo
- Defined in:
- lib/hubba/reposet.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.
37 38 39 40 |
# File 'lib/hubba/reposet.rb', line 37 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.
34 35 36 |
# File 'lib/hubba/reposet.rb', line 34 def name @name end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
34 35 36 |
# File 'lib/hubba/reposet.rb', line 34 def owner @owner end |
Instance Method Details
#diff ⇒ Object
53 54 55 |
# File 'lib/hubba/reposet.rb', line 53 def diff @diff ||= stats.calc_diff_stars( samples: 3, days: 30 ) end |
#full_name ⇒ Object
42 |
# File 'lib/hubba/reposet.rb', line 42 def full_name() "#{owner}/#{name}"; end |
#stats ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/hubba/reposet.rb', line 44 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 |