Exception: OccamsRecord::MissingDataError
- Inherits:
-
StandardError
- Object
- StandardError
- OccamsRecord::MissingDataError
show all
- Defined in:
- lib/occams-record/errors.rb
Overview
Exception raised when a record wasn’t loaded with all requested data
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of MissingDataError.
13
14
15
16
17
|
# File 'lib/occams-record/errors.rb', line 13
def initialize(record, name)
@record, @name = record, name
@model_name = record.class.model_name
@load_trace = record.class.eager_loader_trace
end
|
Instance Attribute Details
#model_name ⇒ String
5
6
7
|
# File 'lib/occams-record/errors.rb', line 5
def model_name
@model_name
end
|
#name ⇒ Symbol
9
10
11
|
# File 'lib/occams-record/errors.rb', line 9
def name
@name
end
|
#record ⇒ OccamsRecord::Result::Row
7
8
9
|
# File 'lib/occams-record/errors.rb', line 7
def record
@record
end
|
Instance Method Details
#to_s ⇒ String
20
21
22
|
# File 'lib/occams-record/errors.rb', line 20
def to_s
message
end
|