Class: Wanikani::Configuration
- Inherits:
-
Object
- Object
- Wanikani::Configuration
- Defined in:
- lib/wanikani/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_revision ⇒ Object
Returns the value of attribute api_revision.
Instance Method Summary collapse
-
#initialize(configuration) ⇒ Configuration
constructor
A new instance of Configuration.
- #to_hash ⇒ Object
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_key ⇒ Object
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/wanikani/configuration.rb', line 3 def api_key @api_key end |
#api_revision ⇒ Object
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_hash ⇒ Object
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 |