Class: Dbsketch::Comparison::TriggerDiff

Inherits:
Diff
  • Object
show all
Defined in:
lib/dbsketch/comparison/trigger_comparator.rb

Instance Attribute Summary collapse

Attributes inherited from Diff

#new_value, #old_value

Instance Method Summary collapse

Methods inherited from Diff

#addition?, #change?, #deletion?

Constructor Details

#initialize(old_trigger, new_trigger) ⇒ TriggerDiff

Returns a new instance of TriggerDiff.



13
14
15
16
17
18
19
20
# File 'lib/dbsketch/comparison/trigger_comparator.rb', line 13

def initialize old_trigger, new_trigger
	super old_trigger, new_trigger
	if change?
		@target = Diff.new(old_trigger.target.name, new_trigger.target.name) if old_trigger.target.name != new_trigger.target.name
		@activation_time = Diff.new(old_trigger.activation_time, new_trigger.activation_time) if old_trigger.activation_time != new_trigger.activation_time
		@algo = Diff.new(old_trigger.algo, new_trigger.algo) if old_trigger.algo != new_trigger.algo
	end
end

Instance Attribute Details

#activation_timeObject (readonly)

Returns the value of attribute activation_time.



21
22
23
# File 'lib/dbsketch/comparison/trigger_comparator.rb', line 21

def activation_time
  @activation_time
end

#algoObject (readonly)

Returns the value of attribute algo.



21
22
23
# File 'lib/dbsketch/comparison/trigger_comparator.rb', line 21

def algo
  @algo
end

#targetObject (readonly)

Returns the value of attribute target.



21
22
23
# File 'lib/dbsketch/comparison/trigger_comparator.rb', line 21

def target
  @target
end