Class: LogSnag::Identify
Overview
Constructs and validates an “identify” object
Constant Summary collapse
- REQUIRED_KEYS =
%i[project user_id properties].freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data, config) ⇒ LogSnag::Insight
constructor
Creates a new Identify object.
Methods inherited from EventBase
Constructor Details
#initialize(data, config) ⇒ LogSnag::Insight
Creates a new Identify object. The data hash must include the following keys:
- :user_id [String] The user ID of the user to be identified.
- :properties [Hash] The properties of the user to be identified.
22 23 24 25 26 27 28 |
# File 'lib/logsnag/identify.rb', line 22 def initialize(data, config) super(data, config) append_required_fields! compact_properties! validate_data end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
11 12 13 |
# File 'lib/logsnag/identify.rb', line 11 def config @config end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
11 12 13 |
# File 'lib/logsnag/identify.rb', line 11 def data @data end |