Sha256: 9a52f1fb497b37aac189f9f9cc4618b854ea08735ea53ec75a727598453236c1

Contents?: true

Size: 738 Bytes

Versions: 12

Compression:

Stored size: 738 Bytes

Contents

module QB
  class Role
    # raised by `.require` when no roles match input
    class NoMatchesError < QB::Error
      attr_accessor :input
      
      def initialize input
        @input = input
        
        super "no roles match input #{ @input.inspect }"
      end
    end
    
    # raised by `.require` when multiple roles match
    class MultipleMatchesError < QB::Error
      attr_accessor :input, :matches
      
      def initialize input, matches
        @input = input
        @matches = matches
        
        super "mutiple roles match input #{ @input.inspect }:\n#{ @matches.join("\n") }"
      end
    end
    
    # raised when there's bad metadata 
    class MetadataError < QB::Error
    end
  end # Role
end # QB

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
qb-0.1.72 lib/qb/role/errors.rb
qb-0.1.71 lib/qb/role/errors.rb
qb-0.1.70 lib/qb/role/errors.rb
qb-0.1.69 lib/qb/role/errors.rb
qb-0.1.68 lib/qb/role/errors.rb
qb-0.1.67 lib/qb/role/errors.rb
qb-0.1.66 lib/qb/role/errors.rb
qb-0.1.65 lib/qb/role/errors.rb
qb-0.1.64 lib/qb/role/errors.rb
qb-0.1.63 lib/qb/role/errors.rb
qb-0.1.62 lib/qb/role/errors.rb
qb-0.1.61 lib/qb/role/errors.rb