Class: JLPT::Config
- Inherits:
-
Object
- Object
- JLPT::Config
- Defined in:
- lib/jlpt/core/config.rb
Overview
Global Configuration Engine.
Manages default options such as furigana format, cache capacity, and fallback behaviors.
Instance Attribute Summary collapse
-
#cache_capacity ⇒ Object
Returns the value of attribute cache_capacity.
-
#default_furigana_format ⇒ Object
Returns the value of attribute default_furigana_format.
-
#mecab_fallback ⇒ Object
Returns the value of attribute mecab_fallback.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
-
#reset! ⇒ Object
Reset configuration to default values.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
13 14 15 16 17 |
# File 'lib/jlpt/core/config.rb', line 13 def initialize @default_furigana_format = :html @cache_capacity = 1000 @mecab_fallback = true end |
Instance Attribute Details
#cache_capacity ⇒ Object
Returns the value of attribute cache_capacity.
11 12 13 |
# File 'lib/jlpt/core/config.rb', line 11 def cache_capacity @cache_capacity end |
#default_furigana_format ⇒ Object
Returns the value of attribute default_furigana_format.
11 12 13 |
# File 'lib/jlpt/core/config.rb', line 11 def default_furigana_format @default_furigana_format end |
#mecab_fallback ⇒ Object
Returns the value of attribute mecab_fallback.
11 12 13 |
# File 'lib/jlpt/core/config.rb', line 11 def mecab_fallback @mecab_fallback end |
Instance Method Details
#reset! ⇒ Object
Reset configuration to default values
20 21 22 |
# File 'lib/jlpt/core/config.rb', line 20 def reset! initialize end |