Exception: OccamsRecord::Results::MissingColumnSelectError
- Inherits:
-
StandardError
- Object
- StandardError
- OccamsRecord::Results::MissingColumnSelectError
- Defined in:
- lib/occams-record/results.rb
Overview
Exception when an unselected column is called on a result row
Instance Attribute Summary collapse
-
#model_name ⇒ Object
readonly
Returns the value of attribute model_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(model_name, name) ⇒ MissingColumnSelectError
constructor
A new instance of MissingColumnSelectError.
- #message ⇒ Object
Constructor Details
#initialize(model_name, name) ⇒ MissingColumnSelectError
Returns a new instance of MissingColumnSelectError.
147 148 149 |
# File 'lib/occams-record/results.rb', line 147 def initialize(model_name, name) @model_name, @name = model_name, name end |
Instance Attribute Details
#model_name ⇒ Object (readonly)
Returns the value of attribute model_name.
144 145 146 |
# File 'lib/occams-record/results.rb', line 144 def model_name @model_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
145 146 147 |
# File 'lib/occams-record/results.rb', line 145 def name @name end |
Instance Method Details
#message ⇒ Object
151 152 153 |
# File 'lib/occams-record/results.rb', line 151 def "The column '#{name}' is unavailable on #{model_name} because it was not included in the SELECT statement!" end |