Exception: Xampl::AlreadyKnownToPersister

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xampl, persister) ⇒ AlreadyKnownToPersister

Returns a new instance of AlreadyKnownToPersister.



31
32
33
34
# File 'lib/xamplr/exceptions.rb', line 31

def initialize(xampl, persister)
  @xampl = xampl
  @msg = "#{xampl} #{xampl.get_the_index} is already known by a persister: #{xampl.persister.name}, so cannot use persister #{persister.name}"
end

Instance Attribute Details

#msgObject (readonly)

Returns the value of attribute msg.



29
30
31
# File 'lib/xamplr/exceptions.rb', line 29

def msg
  @msg
end

#xamplObject (readonly)

Returns the value of attribute xampl.



29
30
31
# File 'lib/xamplr/exceptions.rb', line 29

def xampl
  @xampl
end

Instance Method Details

#messageObject



36
37
38
# File 'lib/xamplr/exceptions.rb', line 36

def message
  @msg
end