Class: AuctionFunCore::Entities::Staff

Inherits:
ROM::Struct
  • Object
show all
Defined in:
lib/auction_fun_core/entities/staff.rb

Overview

Defines the Staff class as Entity. It appears to be a simple data structure class representing staff-related information.

Instance Method Summary collapse

Instance Method Details

#active?Boolean

Checks if the staff is active.

Returns:

  • (Boolean)

    True if the staff is active, otherwise false.



13
14
15
# File 'lib/auction_fun_core/entities/staff.rb', line 13

def active?
  active
end

#inactive?Boolean

Checks if the staff is inactive.

Returns:

  • (Boolean)

    True if the staff is inactive, otherwise false.



21
22
23
# File 'lib/auction_fun_core/entities/staff.rb', line 21

def inactive?
  !active
end

#infoHash

Returns staff information excluding password digest.

Returns:

  • (Hash)

    Staff information.



29
30
31
# File 'lib/auction_fun_core/entities/staff.rb', line 29

def info
  attributes.except(:password_digest)
end