Class: AuctionFunCore::Entities::User
- Inherits:
-
ROM::Struct
- Object
- ROM::Struct
- AuctionFunCore::Entities::User
- Defined in:
- lib/auction_fun_core/entities/user.rb
Overview
User Relations class. This return simple objects with attribute readers to represent data in your user.
Instance Method Summary collapse
- #active? ⇒ Boolean
- #balance ⇒ Object
- #confirmed? ⇒ Boolean
- #email_confirmed? ⇒ Boolean
- #inactive? ⇒ Boolean
- #info ⇒ Object
- #phone_confirmed? ⇒ Boolean
Instance Method Details
#active? ⇒ Boolean
8 9 10 |
# File 'lib/auction_fun_core/entities/user.rb', line 8 def active? active end |
#balance ⇒ Object
32 33 34 |
# File 'lib/auction_fun_core/entities/user.rb', line 32 def balance Money.new(balance_cents, balance_currency) end |
#confirmed? ⇒ Boolean
16 17 18 |
# File 'lib/auction_fun_core/entities/user.rb', line 16 def confirmed? confirmed_at.present? end |
#email_confirmed? ⇒ Boolean
20 21 22 |
# File 'lib/auction_fun_core/entities/user.rb', line 20 def email_confirmed? email_confirmation_at.present? end |
#inactive? ⇒ Boolean
12 13 14 |
# File 'lib/auction_fun_core/entities/user.rb', line 12 def inactive? !active end |
#info ⇒ Object
28 29 30 |
# File 'lib/auction_fun_core/entities/user.rb', line 28 def info attributes.except(:password_digest) end |
#phone_confirmed? ⇒ Boolean
24 25 26 |
# File 'lib/auction_fun_core/entities/user.rb', line 24 def phone_confirmed? phone_confirmation_at.present? end |