Class: LanguageTool::Resources::Rule
- Inherits:
-
Object
- Object
- LanguageTool::Resources::Rule
- Defined in:
- lib/languagetool/resources/rule.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#issue_type ⇒ Object
readonly
Returns the value of attribute issue_type.
Instance Method Summary collapse
-
#initialize(json) ⇒ Rule
constructor
A new instance of Rule.
Constructor Details
#initialize(json) ⇒ Rule
Returns a new instance of Rule.
6 7 8 9 10 11 12 13 14 |
# File 'lib/languagetool/resources/rule.rb', line 6 def initialize(json) @id = json['id'] @description = json['description'] @issue_type = json['issueType'] @offset = json['offset'] @length = json['length'] @category = RuleCategory.new json['category'] end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
4 5 6 |
# File 'lib/languagetool/resources/rule.rb', line 4 def category @category end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/languagetool/resources/rule.rb', line 4 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/languagetool/resources/rule.rb', line 4 def id @id end |
#issue_type ⇒ Object (readonly)
Returns the value of attribute issue_type.
4 5 6 |
# File 'lib/languagetool/resources/rule.rb', line 4 def issue_type @issue_type end |