Class: SpellKit::Configuration
- Inherits:
-
Object
- Object
- SpellKit::Configuration
- Defined in:
- lib/spellkit.rb
Instance Attribute Summary collapse
-
#dictionary ⇒ Object
Returns the value of attribute dictionary.
-
#edit_distance ⇒ Object
Returns the value of attribute edit_distance.
-
#frequency_threshold ⇒ Object
Returns the value of attribute frequency_threshold.
-
#protected_path ⇒ Object
Returns the value of attribute protected_path.
-
#protected_patterns ⇒ Object
Returns the value of attribute protected_patterns.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
26 27 28 29 30 31 32 |
# File 'lib/spellkit.rb', line 26 def initialize @dictionary = DEFAULT_DICTIONARY_URL @protected_path = nil @protected_patterns = [] @edit_distance = 1 @frequency_threshold = 10.0 end |
Instance Attribute Details
#dictionary ⇒ Object
Returns the value of attribute dictionary.
24 25 26 |
# File 'lib/spellkit.rb', line 24 def dictionary @dictionary end |
#edit_distance ⇒ Object
Returns the value of attribute edit_distance.
24 25 26 |
# File 'lib/spellkit.rb', line 24 def edit_distance @edit_distance end |
#frequency_threshold ⇒ Object
Returns the value of attribute frequency_threshold.
24 25 26 |
# File 'lib/spellkit.rb', line 24 def frequency_threshold @frequency_threshold end |
#protected_path ⇒ Object
Returns the value of attribute protected_path.
24 25 26 |
# File 'lib/spellkit.rb', line 24 def protected_path @protected_path end |
#protected_patterns ⇒ Object
Returns the value of attribute protected_patterns.
24 25 26 |
# File 'lib/spellkit.rb', line 24 def protected_patterns @protected_patterns end |
Instance Method Details
#to_h ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/spellkit.rb', line 34 def to_h { dictionary: @dictionary, protected_path: @protected_path, protected_patterns: @protected_patterns, edit_distance: @edit_distance, frequency_threshold: @frequency_threshold } end |