Exception: Statecraft::ConnectionMismatch

Inherits:
Error
  • Object
show all
Defined in:
lib/statecraft/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_classObject (readonly)

Returns the value of attribute log_class.



132
133
134
# File 'lib/statecraft/errors.rb', line 132

def log_class
  @log_class
end

#modelObject (readonly)

Returns the value of attribute model.



132
133
134
# File 'lib/statecraft/errors.rb', line 132

def model
  @model
end