Class: GithubStats::Database
- Inherits:
-
Object
- Object
- GithubStats::Database
- Defined in:
- lib/github_stats/database.rb
Overview
Encapsulates database bits and bobs and tiddles.
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options) ⇒ Database
constructor
A new instance of Database.
- #issues ⇒ Object
- #setup ⇒ Object
Constructor Details
#initialize(options) ⇒ Database
Returns a new instance of Database.
7 8 9 |
# File 'lib/github_stats/database.rb', line 7 def initialize() self. = end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
6 7 8 |
# File 'lib/github_stats/database.rb', line 6 def adapter @adapter end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/github_stats/database.rb', line 6 def @options end |
Instance Method Details
#issues ⇒ Object
15 16 17 |
# File 'lib/github_stats/database.rb', line 15 def issues adapter[:issues] end |
#setup ⇒ Object
19 20 21 22 23 |
# File 'lib/github_stats/database.rb', line 19 def setup return if setup? create_issues create_events end |