Exception: JoinFixError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- JoinFixError
- Defined in:
- lib/joinfix/error.rb
Overview
JoinFix provides help for debugging errors in your fixtures through subclasses of JoinFixError.
Direct Known Subclasses
MakeEntryError, MissingFixtureError, ResolveJoinReferenceError
Instance Attribute Summary collapse
-
#advice ⇒ Object
Returns the value of attribute advice.
-
#entry_name ⇒ Object
readonly
Returns the value of attribute entry_name.
-
#fixtures ⇒ Object
readonly
Returns the value of attribute fixtures.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fixtures, entry_name, msg = nil) ⇒ JoinFixError
constructor
A new instance of JoinFixError.
Constructor Details
#initialize(fixtures, entry_name, msg = nil) ⇒ JoinFixError
Returns a new instance of JoinFixError.
16 17 18 19 20 |
# File 'lib/joinfix/error.rb', line 16 def initialize(fixtures, entry_name, msg=nil) @fixtures = fixtures @entry_name = entry_name @msg = msg end |
Instance Attribute Details
#advice ⇒ Object
Returns the value of attribute advice.
14 15 16 |
# File 'lib/joinfix/error.rb', line 14 def advice @advice end |
#entry_name ⇒ Object (readonly)
Returns the value of attribute entry_name.
13 14 15 |
# File 'lib/joinfix/error.rb', line 13 def entry_name @entry_name end |
#fixtures ⇒ Object (readonly)
Returns the value of attribute fixtures.
13 14 15 |
# File 'lib/joinfix/error.rb', line 13 def fixtures @fixtures end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
13 14 15 |
# File 'lib/joinfix/error.rb', line 13 def msg @msg end |
Class Method Details
.new(*args) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/joinfix/error.rb', line 4 def new(*args) @already_created ||= {} error = super(*args) key = error.fixtures.respond_to?(:fixture_path) ? error.fixtures.fixture_path : error.fixtures @already_created[key] ||= error end |