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.



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

def initialize(name, message = nil)
  @name = name
  @message = message || "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.



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

def name
  @name
end

Instance Method Details

#to_sObject



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

def to_s
  @message
end