Class: LanguageTool::Actions::Check
- Defined in:
- lib/languagetool/actions/check.rb
Constant Summary collapse
- REQUIRED_PARAMETERS =
i(text language).freeze
- OPTIONAL_PARAMETERS =
i(mother_tongue preferred_variants enabled_rules disabled_rules enabled_categories disabled_categories enabled_only).freeze
- PARAMETERS =
(REQUIRED_PARAMETERS + OPTIONAL_PARAMETERS).freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from LanguageTool::Actions::Base
Instance Method Details
#run ⇒ Object
9 10 11 12 13 |
# File 'lib/languagetool/actions/check.rb', line 9 def run response = RestClient.get uri('check'), params: query $languagetool_last_response = response Resources::Matches.new JSON.parse(response.body).merge('original' => [:text]) end |