Class: JLPT::Config

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeConfig

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_capacityObject

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_formatObject

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_fallbackObject

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