Method: QB::Role::MultipleMatchesError#initialize

Defined in:
lib/qb/role/errors.rb

#initialize(input, matches) ⇒ MultipleMatchesError

Returns a new instance of MultipleMatchesError.



22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/qb/role/errors.rb', line 22

def initialize input, matches
  @input = input
  @matches = matches
  
  super binding.erb <<-END
    multiple roles match input <%= @input.inspect %>:
    
    <% @matches.map do |role| %>
      -   <%= role.to_s %> (<%= role.path.to_s %>)
    <% end %>
    
  END
end