Sha256: ca173de2b2503764a012effbb7fd8ab6fccbdc8f5c23568cb9ac2ec955d9b55d

Contents?: true

Size: 411 Bytes

Versions: 8

Compression:

Stored size: 411 Bytes

Contents

module Pronto
  class Message
    attr_reader :path, :line, :level, :msg

    LEVELS = [:info, :warning, :error, :fatal]

    def initialize(path, line, level, msg)
      unless LEVELS.include?(level)
        raise ::ArgumentError, "level should be set to one of #{LEVELS}"
      end

      @path, @line, @level, @msg = path, line, level, msg
    end

    def repo
      line.patch.delta.repo
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pronto-0.1.7 lib/pronto/message.rb
pronto-0.1.6 lib/pronto/message.rb
pronto-0.1.5 lib/pronto/message.rb
pronto-0.1.4 lib/pronto/message.rb
pronto-0.1.3 lib/pronto/message.rb
pronto-0.1.2 lib/pronto/message.rb
pronto-0.1.1 lib/pronto/message.rb
pronto-0.1.0 lib/pronto/message.rb