Class: LanguageTool::Actions::Base
- Inherits:
-
Object
- Object
- LanguageTool::Actions::Base
- Defined in:
- lib/languagetool/actions/base.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(api, options = {}) ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
- #safe_run ⇒ Object
Constructor Details
#initialize(api, options = {}) ⇒ Base
Returns a new instance of Base.
6 7 8 9 |
# File 'lib/languagetool/actions/base.rb', line 6 def initialize(api, = {}) @api = api = end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
4 5 6 |
# File 'lib/languagetool/actions/base.rb', line 4 def api @api end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/languagetool/actions/base.rb', line 4 def end |
Instance Method Details
#run ⇒ Object
11 12 13 |
# File 'lib/languagetool/actions/base.rb', line 11 def run raise NotImplementedError end |
#safe_run ⇒ Object
15 16 17 18 19 |
# File 'lib/languagetool/actions/base.rb', line 15 def safe_run run rescue => e raise APIError, e end |