Class: Glare::CfDnsRecords::Updater::Operation

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/glare/cf_dns_records/updater.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record, action) ⇒ Operation

Returns a new instance of Operation.



33
34
35
36
# File 'lib/glare/cf_dns_records/updater.rb', line 33

def initialize(record, action)
  @record = record.dup
  @action = action
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



43
44
45
# File 'lib/glare/cf_dns_records/updater.rb', line 43

def action
  @action
end

#recordObject (readonly)

Returns the value of attribute record.



43
44
45
# File 'lib/glare/cf_dns_records/updater.rb', line 43

def record
  @record
end

Instance Method Details

#<=>(operation) ⇒ Object



38
39
40
41
# File 'lib/glare/cf_dns_records/updater.rb', line 38

def <=>(operation)
  @record <=> operation.record &&
    @action <=> operation.action
end