Class: YanSpeller::SpellError

Inherits:
Object
  • Object
show all
Defined in:
lib/yan_speller/spell_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(err) ⇒ SpellError

Returns a new instance of SpellError.



4
5
6
7
8
# File 'lib/yan_speller/spell_error.rb', line 4

def initialize err
  err.each do |key, value|
    instance_variable_set("@#{key}".to_sym, value)
  end
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/yan_speller/spell_error.rb', line 10

def to_s
  "Error in the word <#{@word}>, maybe it is better to say <#{@s}>."
end