Class: Appium::Lint::Base
- Inherits:
-
Object
- Object
- Appium::Lint::Base
- Defined in:
- lib/appium_doc_lint/lint/base.rb
Overview
noinspection RubyArgCount
Direct Known Subclasses
ExtMissing, H156Invalid, H2Invalid, H2Missing, H2Multiple, LineBreakInvalid
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
- #call ⇒ Object
- #fail ⇒ Object
-
#initialize(opts) ⇒ Base
constructor
Appium::Lint::Base.new file: ‘/path/to/file’.
-
#warn(line_number, extra = nil) ⇒ warnings
Record a warning on a zero indexed line number.
Constructor Details
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
5 6 7 |
# File 'lib/appium_doc_lint/lint/base.rb', line 5 def input @input end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
5 6 7 |
# File 'lib/appium_doc_lint/lint/base.rb', line 5 def warnings @warnings end |
Instance Method Details
#call ⇒ Object
28 29 30 |
# File 'lib/appium_doc_lint/lint/base.rb', line 28 def call raise NotImplementedError end |
#fail ⇒ Object
24 25 26 |
# File 'lib/appium_doc_lint/lint/base.rb', line 24 def fail raise NotImplementedError end |
#warn(line_number, extra = nil) ⇒ warnings
Record a warning on a zero indexed line number
18 19 20 21 22 |
# File 'lib/appium_doc_lint/lint/base.rb', line 18 def warn line_number, extra=nil = extra ? fail + ' ' + extra : fail warnings[line_number + 1] += [] warnings end |