Class: Wanikani::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/wanikani/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ Configuration

Returns a new instance of Configuration.



5
6
7
# File 'lib/wanikani/configuration.rb', line 5

def initialize(configuration)
  @api_revision = configuration.fetch(:api_revision)
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



3
4
5
# File 'lib/wanikani/configuration.rb', line 3

def api_key
  @api_key
end

#api_revisionObject

Returns the value of attribute api_revision.



3
4
5
# File 'lib/wanikani/configuration.rb', line 3

def api_revision
  @api_revision
end

Instance Method Details

#to_hashObject



9
10
11
12
13
14
# File 'lib/wanikani/configuration.rb', line 9

def to_hash
  {
    api_revision: api_revision,
    api_key: api_key
  }
end