Class: Pantry::ClientRegistry::ClientRecord
- Inherits:
-
Object
- Object
- Pantry::ClientRegistry::ClientRecord
- Defined in:
- lib/pantry/client_registry.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#last_checked_in_at ⇒ Object
readonly
Returns the value of attribute last_checked_in_at.
Instance Method Summary collapse
- #check_in(client) ⇒ Object
- #checked_in? ⇒ Boolean
-
#initialize ⇒ ClientRecord
constructor
A new instance of ClientRecord.
Constructor Details
#initialize ⇒ ClientRecord
Returns a new instance of ClientRecord.
88 89 90 91 |
# File 'lib/pantry/client_registry.rb', line 88 def initialize @client = nil @last_checked_in_at = nil end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
86 87 88 |
# File 'lib/pantry/client_registry.rb', line 86 def client @client end |
#last_checked_in_at ⇒ Object (readonly)
Returns the value of attribute last_checked_in_at.
86 87 88 |
# File 'lib/pantry/client_registry.rb', line 86 def last_checked_in_at @last_checked_in_at end |
Instance Method Details
#check_in(client) ⇒ Object
93 94 95 96 |
# File 'lib/pantry/client_registry.rb', line 93 def check_in(client) @client = client @last_checked_in_at = Time.now end |
#checked_in? ⇒ Boolean
98 99 100 |
# File 'lib/pantry/client_registry.rb', line 98 def checked_in? !@last_checked_in_at.nil? end |