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.



19
20
21
22
# File 'lib/xamplr/exceptions.rb', line 19

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.



17
18
19
# File 'lib/xamplr/exceptions.rb', line 17

def msg
  @msg
end

#xamplObject (readonly)

Returns the value of attribute xampl.



17
18
19
# File 'lib/xamplr/exceptions.rb', line 17

def xampl
  @xampl
end

Instance Method Details

#messageObject



24
25
26
# File 'lib/xamplr/exceptions.rb', line 24

def message
  @msg
end