class Pronto::BigFiles::MessageCreator
Creates Pronto
warning message objects
Attributes
num_files[R]
target_num_lines[R]
total_lines[R]
Public Class Methods
new(num_files, total_lines, target_num_lines)
click to toggle source
# File lib/pronto/bigfiles/message_creator.rb, line 12 def initialize(num_files, total_lines, target_num_lines) @num_files = num_files @total_lines = total_lines @target_num_lines = target_num_lines end
Public Instance Methods
create_message(patch_wrapper, num_lines)
click to toggle source
# File lib/pronto/bigfiles/message_creator.rb, line 18 def create_message(patch_wrapper, num_lines) path = patch_wrapper.path line = patch_wrapper.first_added_line level = :warning msg = "This file, one of the #{num_files} largest in the project, " \ "increased in size to #{num_lines} lines. The total size " \ "of those files is now #{total_lines} lines " \ "(target: #{target_num_lines}). Is this file complex " \ "enough to refactor?" Message.new(path, line, level, msg, nil, Pronto::BigFiles) end