Sha256: 66bdb03249b332622e28f9de51a0e97f1085179ba7c96136cdb1c64dc5af540b
Contents?: true
Size: 821 Bytes
Versions: 11
Compression:
Stored size: 821 Bytes
Contents
module Rake::Funnel class AmbiguousFileError < StandardError attr_reader :task_name, :search_pattern, :candidates, :description def initialize(message, task_name, search_pattern, candidates) description = "Could not run task '#{task_name}'. #{message}" super(description) @description = description @task_name = task_name @search_pattern = search_pattern @candidates = candidates end def to_s msg = [] (msg << description) if description (msg << "Search pattern used: #{@search_pattern}") if @search_pattern unless (@candidates || []).empty? msg << 'Candidates:' msg << @candidates.map { |c| " - #{c}" } end msg = [super.to_s] if msg.empty? msg.join("\n") end end end
Version data entries
11 entries across 11 versions & 1 rubygems