Exception: ActiveRecordCompose::UninitializedAttribute
- Inherits:
-
ActiveRecordComposeError
- Object
- StandardError
- ActiveRecordComposeError
- ActiveRecordCompose::UninitializedAttribute
- Defined in:
- lib/active_record_compose/exceptions.rb
Overview
Occurs when accessing Attributes without initializing it.
Instance Attribute Summary collapse
-
#record ⇒ void
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record = nil) ⇒ UninitializedAttribute
constructor
A new instance of UninitializedAttribute.
Constructor Details
#initialize(record = nil) ⇒ UninitializedAttribute
Returns a new instance of UninitializedAttribute.
51 52 53 54 55 |
# File 'lib/active_record_compose/exceptions.rb', line 51 def initialize(record = nil) @record = record = "No attributes have been set. Is proper initialization performed, such as calling `super` in `initialize`?" super() end |
Instance Attribute Details
#record ⇒ void (readonly)
Returns the value of attribute record.
49 50 51 |
# File 'lib/active_record_compose/exceptions.rb', line 49 def record @record end |