Module: YanSpeller
- Defined in:
- lib/yan_speller/spell_request.rb,
lib/yan_speller.rb,
lib/yan_speller/speller.rb,
lib/yan_speller/spell_error.rb
Overview
require ‘uri’
Defined Under Namespace
Classes: SpellError, SpellRequest, Speller
Constant Summary collapse
- MAJOR =
'1'
- MINOR =
'0'
- PATCH =
'1'
Class Method Summary collapse
Class Method Details
.check(text) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/yan_speller.rb', line 15 def self.check text speller = Speller.new result = speller.check_spell(text) if result == :no_spell_errors puts 'No errors.It is all good and right.' elsif result == :request_fail puts 'Fail to get an answer.' else puts speller.errors_to_s end end |