Exception: PgObjects::AmbiguousDependencyError
- Inherits:
-
StandardError
- Object
- StandardError
- PgObjects::AmbiguousDependencyError
- Defined in:
- lib/pg_objects.rb
Overview
Raised when a dependency name resolves to more than one object. Carries
the matching objects' file paths via candidates and the file that
declared the dependency via referrer; the message lists them all. Also
accepts a bare name for compatibility.
Instance Attribute Summary collapse
-
#candidates ⇒ Object
readonly
Returns the value of attribute candidates.
-
#referrer ⇒ Object
readonly
Returns the value of attribute referrer.
Instance Method Summary collapse
-
#initialize(dep_name = nil, candidates: [], referrer: nil) ⇒ AmbiguousDependencyError
constructor
A new instance of AmbiguousDependencyError.
Constructor Details
#initialize(dep_name = nil, candidates: [], referrer: nil) ⇒ AmbiguousDependencyError
Returns a new instance of AmbiguousDependencyError.
13 14 15 16 17 18 |
# File 'lib/pg_objects.rb', line 13 def initialize(dep_name = nil, candidates: [], referrer: nil) @candidates = candidates @referrer = referrer = (dep_name) .empty? ? super() : super() end |
Instance Attribute Details
#candidates ⇒ Object (readonly)
Returns the value of attribute candidates.
11 12 13 |
# File 'lib/pg_objects.rb', line 11 def candidates @candidates end |
#referrer ⇒ Object (readonly)
Returns the value of attribute referrer.
11 12 13 |
# File 'lib/pg_objects.rb', line 11 def referrer @referrer end |