Exception: Apartment::TenantNotFound
- Inherits:
-
ApartmentError
- Object
- StandardError
- ApartmentError
- Apartment::TenantNotFound
- Defined in:
- lib/apartment/errors.rb
Overview
Raised when a tenant cannot be found.
Instance Attribute Summary collapse
-
#tenant ⇒ Object
readonly
Returns the value of attribute tenant.
Instance Method Summary collapse
-
#initialize(tenant = nil) ⇒ TenantNotFound
constructor
A new instance of TenantNotFound.
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
#tenant ⇒ Object (readonly)
Returns the value of attribute tenant.
9 10 11 |
# File 'lib/apartment/errors.rb', line 9 def tenant @tenant end |