Sha256: 81f32aef4a4011dac33e837ee49f2506b88029c73cd1a77883308f41043adea9

Contents?: true

Size: 427 Bytes

Versions: 7

Compression:

Stored size: 427 Bytes

Contents

require "colored"
require "cork"

module Playgroundbook
  # AbstractLinter provides a base implementation of a linter which a concrete
  # linter subclass can inherit from
  class AbstractLinter
    @ui = Cork::Board.new

    class << self
      attr_accessor :ui
    end

    def fail_lint(msg)
      AbstractLinter.ui.puts msg.red
      exit 1
    end

    def message(msg)
      AbstractLinter.ui.puts msg
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
playgroundbook-1.2.0 lib/linter/abstract_linter.rb
playgroundbook-1.1.1 lib/linter/abstract_linter.rb
playgroundbook-1.1.0 lib/linter/abstract_linter.rb
playgroundbook-1.0.0 lib/linter/abstract_linter.rb
playgroundbook-0.6.0 lib/linter/abstract_linter.rb
playgroundbook-0.5.0 lib/linter/abstract_linter.rb
playgroundbook-0.4.0 lib/linter/abstract_linter.rb