Exception: Apartment::TenantNotFound

Inherits:
ApartmentError show all
Defined in:
lib/apartment/errors.rb

Overview

Raised when a tenant cannot be found.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tenant = nil) ⇒ TenantNotFound

Returns a new instance of TenantNotFound.



11
12
13
14
# File 'lib/apartment/errors.rb', line 11

def initialize(tenant = nil)
  @tenant = tenant
  super(tenant ? "Tenant '#{tenant}' not found" : 'Tenant not found')
end

Instance Attribute Details

#tenantObject (readonly)

Returns the value of attribute tenant.



9
10
11
# File 'lib/apartment/errors.rb', line 9

def tenant
  @tenant
end