Skip to content

Commit

Permalink
Added runner attribute to the message initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Feb 12, 2016
1 parent c267f32 commit c6666e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/pronto/message.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module Pronto
class Message
attr_reader :path, :line, :level, :msg, :commit_sha
attr_reader :path, :line, :level, :msg, :commit_sha, :runner

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

def initialize(path, line, level, msg, commit_sha = nil)
def initialize(path, line, level, msg, commit_sha = nil, runner = nil)
unless LEVELS.include?(level)
raise ::ArgumentError, "level should be set to one of #{LEVELS}"
end
Expand All @@ -13,6 +13,7 @@ def initialize(path, line, level, msg, commit_sha = nil)
@line = line
@level = level
@msg = msg
@runner = runner
@commit_sha = commit_sha
@commit_sha ||= line.commit_sha if line
end
Expand Down

0 comments on commit c6666e5

Please # to comment.