Class: Clerk::Models::Components::MachineScopeDeleted

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

Overview

Machine scope deleted successfully for a machine

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(object:, from_machine_id:, to_machine_id:, deleted: true) ⇒ MachineScopeDeleted

Returns a new instance of MachineScopeDeleted.



25
26
27
28
29
30
31
32
33
# File 'lib/clerk/models/components/machinescope_deleted.rb', line 25

def initialize(object:, from_machine_id:, to_machine_id:, deleted: true)
  @object = object
  @from_machine_id = from_machine_id
  @to_machine_id = to_machine_id
  unless deleted == true
    raise ArgumentError, 'Invalid value for deleted'
  end
  @deleted = true
end

Instance Method Details

#==(other) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/clerk/models/components/machinescope_deleted.rb', line 36

def ==(other)
  return false unless other.is_a? self.class
  return false unless @object == other.object
  return false unless @from_machine_id == other.from_machine_id
  return false unless @to_machine_id == other.to_machine_id
  return false unless @deleted == other.deleted
  true
end