Class: BBMB::Html::State::CustomerDecorator
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- BBMB::Html::State::CustomerDecorator
- Defined in:
- lib/bbmb/html/state/customers.rb
Instance Method Summary collapse
-
#initialize(model, session) ⇒ CustomerDecorator
constructor
A new instance of CustomerDecorator.
- #last_login ⇒ Object
- #valid ⇒ Object
Constructor Details
#initialize(model, session) ⇒ CustomerDecorator
Returns a new instance of CustomerDecorator.
68 69 70 71 72 |
# File 'lib/bbmb/html/state/customers.rb', line 68 def initialize(model, session) @source = model @session = session self.__setobj__(@source) end |
Instance Method Details
#last_login ⇒ Object
74 75 76 |
# File 'lib/bbmb/html/state/customers.rb', line 74 def last_login @last_login ||= @session.auth_session.last_login(email) end |
#valid ⇒ Object
78 79 80 |
# File 'lib/bbmb/html/state/customers.rb', line 78 def valid @valid ||= @session.user.entity_valid?(email).to_s end |