Class: YaSpeller::Spell
- Inherits:
-
Object
- Object
- YaSpeller::Spell
- Defined in:
- lib/ya_speller/spell.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#col ⇒ Object
readonly
Returns the value of attribute col.
-
#len ⇒ Object
readonly
Returns the value of attribute len.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
-
#row ⇒ Object
readonly
Returns the value of attribute row.
-
#s ⇒ Object
readonly
Returns the value of attribute s.
-
#word ⇒ Object
readonly
Returns the value of attribute word.
Instance Method Summary collapse
-
#initialize(record) ⇒ Spell
constructor
A new instance of Spell.
- #to_s ⇒ Object
Constructor Details
#initialize(record) ⇒ Spell
Returns a new instance of Spell.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ya_speller/spell.rb', line 6 def initialize record @code = record['code'] @pos = record['pos'] @row = record['row'] @col = record['col'] @len = record['len'] @word = record['word'] @s = record['s'] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/ya_speller/spell.rb', line 4 def code @code end |
#col ⇒ Object (readonly)
Returns the value of attribute col.
4 5 6 |
# File 'lib/ya_speller/spell.rb', line 4 def col @col end |
#len ⇒ Object (readonly)
Returns the value of attribute len.
4 5 6 |
# File 'lib/ya_speller/spell.rb', line 4 def len @len end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
4 5 6 |
# File 'lib/ya_speller/spell.rb', line 4 def pos @pos end |
#row ⇒ Object (readonly)
Returns the value of attribute row.
4 5 6 |
# File 'lib/ya_speller/spell.rb', line 4 def row @row end |
#s ⇒ Object (readonly)
Returns the value of attribute s.
4 5 6 |
# File 'lib/ya_speller/spell.rb', line 4 def s @s end |
#word ⇒ Object (readonly)
Returns the value of attribute word.
4 5 6 |
# File 'lib/ya_speller/spell.rb', line 4 def word @word end |
Instance Method Details
#to_s ⇒ Object
17 18 19 |
# File 'lib/ya_speller/spell.rb', line 17 def to_s "Ошибка в слове: #{@word} \nправильное написание: #{@s}" end |