Class: Clerk::Models::Components::LogContext
- Inherits:
-
Object
- Object
- Clerk::Models::Components::LogContext
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/logcontext.rb
Overview
Context information about the environment and device where the event occurred.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(environment: nil, device: nil) ⇒ LogContext
constructor
A new instance of LogContext.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(environment: nil, device: nil) ⇒ LogContext
Returns a new instance of LogContext.
21 22 23 24 |
# File 'lib/clerk/models/components/logcontext.rb', line 21 def initialize(environment: nil, device: nil) @environment = environment @device = device end |
Instance Method Details
#==(other) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/clerk/models/components/logcontext.rb', line 27 def ==(other) return false unless other.is_a? self.class return false unless @environment == other.environment return false unless @device == other.device true end |