Exception: MakeEntryError
- Inherits:
-
JoinFixError
- Object
- RuntimeError
- JoinFixError
- MakeEntryError
- Defined in:
- lib/joinfix/error.rb
Overview
:nodoc:
Direct Known Subclasses
EntryCollisionError, MissingPolymorphicTypeError, MultipleChildrenError, NoEntryNameError
Instance Attribute Summary collapse
-
#advice ⇒ Object
Returns the value of attribute advice.
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
Attributes inherited from JoinFixError
Instance Method Summary collapse
-
#initialize(fixtures, entry_name, entry, msg = nil) ⇒ MakeEntryError
constructor
A new instance of MakeEntryError.
- #message ⇒ Object
Methods inherited from JoinFixError
Constructor Details
#initialize(fixtures, entry_name, entry, msg = nil) ⇒ MakeEntryError
Returns a new instance of MakeEntryError.
49 50 51 52 |
# File 'lib/joinfix/error.rb', line 49 def initialize(fixtures, entry_name, entry, msg=nil) super(fixtures, entry_name, msg) @entry = entry end |
Instance Attribute Details
#advice ⇒ Object
Returns the value of attribute advice.
47 48 49 |
# File 'lib/joinfix/error.rb', line 47 def advice @advice end |
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
46 47 48 |
# File 'lib/joinfix/error.rb', line 46 def entry @entry end |
Instance Method Details
#message ⇒ Object
54 55 56 57 58 59 |
# File 'lib/joinfix/error.rb', line 54 def "Error making <#{fixtures.klass.table_name}(:#{entry_name})> in <#{fixtures.fixture_path}>.\n" + {entry_name => entry}.to_yaml + (msg.nil? ? '' : "\n#{msg}\n") + (advice.nil? ? '' : "#{advice}\n") end |