Exception: Xampl::NoPersisterNamed

Inherits:
Exception
  • Object
show all
Defined in:
lib/xamplr/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil) ⇒ NoPersisterNamed

Returns a new instance of NoPersisterNamed.



69
70
71
# File 'lib/xamplr/exceptions.rb', line 69

def initialize(name=nil)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



67
68
69
# File 'lib/xamplr/exceptions.rb', line 67

def name
  @name
end

Instance Method Details

#messageObject



73
74
75
76
77
78
79
# File 'lib/xamplr/exceptions.rb', line 73

def message
  if name then
    "there is no persister named: '#{ @name }'"
  else
    "no name was supplied"
  end
end