Class: Clerk::Models::Components::LogDeviceContext
- Inherits:
-
Object
- Object
- Clerk::Models::Components::LogDeviceContext
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/logdevicecontext.rb
Overview
Device information for the log event.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(browser: nil, location: nil, ip_address: nil, user_agent: nil, device_type: nil, is_mobile: nil, clerk_js_version: nil, is_native: nil) ⇒ LogDeviceContext
constructor
A new instance of LogDeviceContext.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(browser: nil, location: nil, ip_address: nil, user_agent: nil, device_type: nil, is_mobile: nil, clerk_js_version: nil, is_native: nil) ⇒ LogDeviceContext
Returns a new instance of LogDeviceContext.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/clerk/models/components/logdevicecontext.rb', line 33 def initialize(browser: nil, location: nil, ip_address: nil, user_agent: nil, device_type: nil, is_mobile: nil, clerk_js_version: nil, is_native: nil) @browser = browser @location = location @ip_address = ip_address @user_agent = user_agent @device_type = device_type @is_mobile = is_mobile @clerk_js_version = clerk_js_version @is_native = is_native end |
Instance Method Details
#==(other) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/clerk/models/components/logdevicecontext.rb', line 45 def ==(other) return false unless other.is_a? self.class return false unless @browser == other.browser return false unless @location == other.location return false unless @ip_address == other.ip_address return false unless @user_agent == other.user_agent return false unless @device_type == other.device_type return false unless @is_mobile == other.is_mobile return false unless @clerk_js_version == other.clerk_js_version return false unless @is_native == other.is_native true end |