Class: Hackle::User
- Inherits:
-
Object
- Object
- Hackle::User
- Defined in:
- lib/hackle/user.rb
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
- #device_id ⇒ String? readonly
- #id ⇒ String? readonly
- #identifiers ⇒ Hash{String => String} readonly
- #properties ⇒ Hash{String => Object} readonly
- #user_id ⇒ String? readonly
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id:, user_id:, device_id:, identifiers:, properties:) ⇒ User
constructor
A new instance of User.
- #to_s ⇒ Object
Constructor Details
#initialize(id:, user_id:, device_id:, identifiers:, properties:) ⇒ User
Returns a new instance of User.
28 29 30 31 32 33 34 |
# File 'lib/hackle/user.rb', line 28 def initialize(id:, user_id:, device_id:, identifiers:, properties:) @id = id @user_id = user_id @device_id = device_id @identifiers = identifiers @properties = properties end |
Instance Attribute Details
#device_id ⇒ String? (readonly)
15 16 17 |
# File 'lib/hackle/user.rb', line 15 def device_id @device_id end |
#id ⇒ String? (readonly)
9 10 11 |
# File 'lib/hackle/user.rb', line 9 def id @id end |
#identifiers ⇒ Hash{String => String} (readonly)
18 19 20 |
# File 'lib/hackle/user.rb', line 18 def identifiers @identifiers end |
#properties ⇒ Hash{String => Object} (readonly)
21 22 23 |
# File 'lib/hackle/user.rb', line 21 def properties @properties end |
#user_id ⇒ String? (readonly)
12 13 14 |
# File 'lib/hackle/user.rb', line 12 def user_id @user_id end |
Class Method Details
.builder ⇒ User::Builder
51 52 53 |
# File 'lib/hackle/user.rb', line 51 def self.builder Builder.new end |
Instance Method Details
#==(other) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/hackle/user.rb', line 36 def ==(other) return false unless other.is_a?(User) id == other.id && user_id == other.user_id && device_id == other.device_id && identifiers == other.identifiers && properties == other.properties end |
#to_s ⇒ Object
46 47 48 |
# File 'lib/hackle/user.rb', line 46 def to_s "Hackle::User(id: #{id}, user_id: #{user_id}, device_id: #{device_id}, identifiers: #{identifiers}, properties: #{properties})" end |