class Appium::Lint::Base
noinspection RubyArgCount
Attributes
input[R]
warnings[R]
Public Class Methods
new(opts)
click to toggle source
Appium::Lint::Base.new
file: ‘/path/to/file’
Appium::Lint::Base.new
data: ‘some markdown’
# File lib/appium_doc_lint/lint/base.rb, line 9 def initialize opts @input = opts.is_a?(OpenStruct) ? opts : Appium::Lint.new_input(opts) @warnings = Hash.new [] end
Public Instance Methods
call()
click to toggle source
# File lib/appium_doc_lint/lint/base.rb, line 28 def call raise NotImplementedError end
fail()
click to toggle source
# File lib/appium_doc_lint/lint/base.rb, line 24 def fail raise NotImplementedError end
warn(line_number, extra=nil)
click to toggle source
Record a warning on a zero indexed line number
@param line_number [int] line number to warn on @return [warnings]
# File lib/appium_doc_lint/lint/base.rb, line 18 def warn line_number, extra=nil message = extra ? fail + ' ' + extra : fail warnings[line_number + 1] += [message] warnings end