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.
33 34 35 36 37 38 39 |
# File 'lib/spellkit.rb', line 33 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.
31 32 33 |
# File 'lib/spellkit.rb', line 31 def dictionary @dictionary end |
#edit_distance ⇒ Object
Returns the value of attribute edit_distance.
31 32 33 |
# File 'lib/spellkit.rb', line 31 def edit_distance @edit_distance end |
#frequency_threshold ⇒ Object
Returns the value of attribute frequency_threshold.
31 32 33 |
# File 'lib/spellkit.rb', line 31 def frequency_threshold @frequency_threshold end |
#protected_path ⇒ Object
Returns the value of attribute protected_path.
31 32 33 |
# File 'lib/spellkit.rb', line 31 def protected_path @protected_path end |
#protected_patterns ⇒ Object
Returns the value of attribute protected_patterns.
31 32 33 |
# File 'lib/spellkit.rb', line 31 def protected_patterns @protected_patterns end |
Instance Method Details
#to_h ⇒ Object
41 42 43 44 45 46 47 48 49 |
# File 'lib/spellkit.rb', line 41 def to_h { dictionary: @dictionary, protected_path: @protected_path, protected_patterns: @protected_patterns, edit_distance: @edit_distance, frequency_threshold: @frequency_threshold } end |