Class: Kybus::Storage::Exceptions::ObjectAlreadyExists

Inherits:
Exceptions::KybusFail
  • Object
show all
Defined in:
lib/kybus/storage/datasource/exceptions.rb

Overview

Exception used when there is an object trying to be created but it already exists.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, object) ⇒ ObjectAlreadyExists

Returns a new instance of ObjectAlreadyExists.



12
13
14
15
# File 'lib/kybus/storage/datasource/exceptions.rb', line 12

def initialize(id, object)
  @id = id
  super("Object #{id} already exists", nil, object)
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/kybus/storage/datasource/exceptions.rb', line 10

def id
  @id
end