Exception: Statecraft::ConnectionMismatch
- Defined in:
- lib/statecraft/errors.rb
Instance Attribute Summary collapse
-
#log_class ⇒ Object
readonly
Returns the value of attribute log_class.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(model:, log_class:) ⇒ ConnectionMismatch
constructor
A new instance of ConnectionMismatch.
Constructor Details
#initialize(model:, log_class:) ⇒ ConnectionMismatch
Returns a new instance of ConnectionMismatch.
134 135 136 137 138 139 140 |
# File 'lib/statecraft/errors.rb', line 134 def initialize(model:, log_class:) @model = model @log_class = log_class super("#{log_class.name} does not share #{model.name}'s connection " \ "(#{log_class.connection_specification_name} vs #{model.connection_specification_name}); " \ "make the log model inherit from the model's connection-owning ancestor") end |
Instance Attribute Details
#log_class ⇒ Object (readonly)
Returns the value of attribute log_class.
132 133 134 |
# File 'lib/statecraft/errors.rb', line 132 def log_class @log_class end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
132 133 134 |
# File 'lib/statecraft/errors.rb', line 132 def model @model end |