Class: GithubStats::Database

Inherits:
Object
  • Object
show all
Defined in:
lib/github_stats/database.rb

Overview

Encapsulates database bits and bobs and tiddles.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Database

Returns a new instance of Database.



7
8
9
# File 'lib/github_stats/database.rb', line 7

def initialize(options)
  self.options = options
end

Instance Attribute Details

#adapterObject

Returns the value of attribute adapter.



6
7
8
# File 'lib/github_stats/database.rb', line 6

def adapter
  @adapter
end

#optionsObject

Returns the value of attribute options.



6
7
8
# File 'lib/github_stats/database.rb', line 6

def options
  @options
end

Instance Method Details

#issuesObject



15
16
17
# File 'lib/github_stats/database.rb', line 15

def issues
  adapter[:issues]
end

#setupObject



19
20
21
22
23
# File 'lib/github_stats/database.rb', line 19

def setup
  return if setup?
  create_issues
  create_events
end