Sha256: 572e8744b3220ba22634109e32a99adc45b5ed8955f3129045f7ba733c4e5af1

Contents?: true

Size: 389 Bytes

Versions: 27

Compression:

Stored size: 389 Bytes

Contents

module Lrama
  class Warning
    attr_reader :errors, :warns

    def initialize(out = STDERR)
      @out = out
      @errors = []
      @warns = []
    end

    def error(message)
      @out << message << "\n"
      @errors << message
    end

    def warn(message)
      @out << message << "\n"
      @warns << message
    end

    def has_error?
      !@errors.empty?
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
lrama-0.6.9 lib/lrama/warning.rb
lrama-0.6.8 lib/lrama/warning.rb
lrama-0.6.7 lib/lrama/warning.rb
lrama-0.6.6 lib/lrama/warning.rb
lrama-0.6.5 lib/lrama/warning.rb
lrama-0.6.4 lib/lrama/warning.rb
lrama-0.6.3 lib/lrama/warning.rb
lrama-0.6.2 lib/lrama/warning.rb
lrama-0.6.1 lib/lrama/warning.rb
lrama-0.6.0 lib/lrama/warning.rb
lrama-0.5.12 lib/lrama/warning.rb
lrama-0.5.11 lib/lrama/warning.rb
lrama-0.5.10 lib/lrama/warning.rb
lrama-0.5.9 lib/lrama/warning.rb
lrama-0.5.8 lib/lrama/warning.rb
lrama-0.5.7 lib/lrama/warning.rb
lrama-0.5.6 lib/lrama/warning.rb
lrama-0.5.5 lib/lrama/warning.rb
lrama-0.5.4 lib/lrama/warning.rb
lrama-0.5.3 lib/lrama/warning.rb