Sha256: 686ced7a74645d85f4fc5428475b24d944df3f7c0757fd94e55479fd6d52a7e6

Contents?: true

Size: 760 Bytes

Versions: 4

Compression:

Stored size: 760 Bytes

Contents

module Appium
  class Lint
    # noinspection RubyArgCount
    class Base
      attr_reader :input, :warnings
      # Appium::Lint::Base.new file: '/path/to/file'
      #
      # Appium::Lint::Base.new data: 'some **markdown**'
      def initialize opts
        @input    = opts.is_a?(OpenStruct) ? opts : Appium::Lint.new_input(opts)
        @warnings = Hash.new []
      end

      # Record a warning on a zero indexed line number
      #
      # @param line_number [int] line number to warn on
      # @return [warnings]
      def warn line_number
        warnings[line_number + 1] += [fail]
        warnings
      end

      def fail
        raise NotImplementedError
      end

      def call
        raise NotImplementedError
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
appium_doc_lint-0.0.4 lib/appium_doc_lint/lint/base.rb
appium_doc_lint-0.0.3 lib/appium_doc_lint/lint/base.rb
appium_doc_lint-0.0.2 lib/appium_doc_lint/lint/base.rb
appium_doc_lint-0.0.1 lib/appium_doc_lint/lint/base.rb