Class: GraphQL::Modernize::Offense
- Inherits:
-
Object
- Object
- GraphQL::Modernize::Offense
- Defined in:
- lib/graphql/modernize/offense.rb
Instance Attribute Summary collapse
-
#conflicting_rule_id ⇒ Object
Returns the value of attribute conflicting_rule_id.
-
#corrected ⇒ Object
Returns the value of attribute corrected.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#rule_id ⇒ Object
readonly
Returns the value of attribute rule_id.
-
#safety ⇒ Object
readonly
Returns the value of attribute safety.
Instance Method Summary collapse
- #correctable? ⇒ Boolean
- #corrected? ⇒ Boolean
-
#initialize(rule_id:, location:, message:, safety:, path:, correctable:) ⇒ Offense
constructor
A new instance of Offense.
Constructor Details
#initialize(rule_id:, location:, message:, safety:, path:, correctable:) ⇒ Offense
Returns a new instance of Offense.
9 10 11 12 13 14 15 16 17 |
# File 'lib/graphql/modernize/offense.rb', line 9 def initialize(rule_id:, location:, message:, safety:, path:, correctable:) @rule_id = rule_id @location = location @message = @safety = safety @path = path @correctable = correctable @corrected = false end |
Instance Attribute Details
#conflicting_rule_id ⇒ Object
Returns the value of attribute conflicting_rule_id.
7 8 9 |
# File 'lib/graphql/modernize/offense.rb', line 7 def conflicting_rule_id @conflicting_rule_id end |
#corrected ⇒ Object
Returns the value of attribute corrected.
7 8 9 |
# File 'lib/graphql/modernize/offense.rb', line 7 def corrected @corrected end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
6 7 8 |
# File 'lib/graphql/modernize/offense.rb', line 6 def location @location end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/graphql/modernize/offense.rb', line 6 def @message end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/graphql/modernize/offense.rb', line 6 def path @path end |
#rule_id ⇒ Object (readonly)
Returns the value of attribute rule_id.
6 7 8 |
# File 'lib/graphql/modernize/offense.rb', line 6 def rule_id @rule_id end |
#safety ⇒ Object (readonly)
Returns the value of attribute safety.
6 7 8 |
# File 'lib/graphql/modernize/offense.rb', line 6 def safety @safety end |
Instance Method Details
#correctable? ⇒ Boolean
19 20 21 |
# File 'lib/graphql/modernize/offense.rb', line 19 def correctable? @correctable end |
#corrected? ⇒ Boolean
23 24 25 |
# File 'lib/graphql/modernize/offense.rb', line 23 def corrected? corrected end |