Class: Clerk::Models::Components::Instance

Inherits:
Object
  • Object
show all
Includes:
Crystalline::MetadataFields
Defined in:
lib/clerk/models/components/instance.rb

Overview

Success

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(object:, id:, environment_type:, allowed_subdomains:, subdomain_allowlist_enabled:, allowed_origins: nil, workspace_id: nil, max_allowed_users: nil) ⇒ Instance

Returns a new instance of Instance.



33
34
35
36
37
38
39
40
41
42
# File 'lib/clerk/models/components/instance.rb', line 33

def initialize(object:, id:, environment_type:, allowed_subdomains:, subdomain_allowlist_enabled:, allowed_origins: nil, workspace_id: nil, max_allowed_users: nil)
  @object = object
  @id = id
  @environment_type = environment_type
  @allowed_subdomains = allowed_subdomains
  @subdomain_allowlist_enabled = subdomain_allowlist_enabled
  @allowed_origins = allowed_origins
  @workspace_id = workspace_id
  @max_allowed_users = max_allowed_users
end

Instance Method Details

#==(other) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/clerk/models/components/instance.rb', line 45

def ==(other)
  return false unless other.is_a? self.class
  return false unless @object == other.object
  return false unless @id == other.id
  return false unless @environment_type == other.environment_type
  return false unless @allowed_subdomains == other.allowed_subdomains
  return false unless @subdomain_allowlist_enabled == other.subdomain_allowlist_enabled
  return false unless @allowed_origins == other.allowed_origins
  return false unless @workspace_id == other.workspace_id
  return false unless @max_allowed_users == other.max_allowed_users
  true
end