Exception: Pickle::Session::ModelNotKnownError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/pickle/session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, message = nil) ⇒ ModelNotKnownError

Returns a new instance of ModelNotKnownError


6
7
8
9
# File 'lib/pickle/session.rb', line 6

def initialize(name, message = nil)
  @name = name
  @message = message.presence || "The model: '#{name}' is not known in this scenario.  Use #create_model to create, or #find_model to find, and store a reference in this scenario."
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name


4
5
6
# File 'lib/pickle/session.rb', line 4

def name
  @name
end

Instance Method Details

#to_sObject


11
12
13
# File 'lib/pickle/session.rb', line 11

def to_s
  @message
end