Class: Dbsketch::Comparison::IndexDiff

Inherits:
Diff
  • Object
show all
Defined in:
lib/dbsketch/comparison/index_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_index, new_index, columns) ⇒ IndexDiff

Returns a new instance of IndexDiff.



12
13
14
15
16
17
18
# File 'lib/dbsketch/comparison/index_comparator.rb', line 12

def initialize old_index, new_index, columns
	super old_index, new_index
	if change?
		@target = Diff.new(old_index.target, new_index.target) if old_index.target.name != new_index.target.name
		@columns = columns
	end
end

Instance Attribute Details

#columnsObject (readonly)

Returns the value of attribute columns.



20
21
22
# File 'lib/dbsketch/comparison/index_comparator.rb', line 20

def columns
  @columns
end

#targetObject (readonly)

Returns the value of attribute target.



20
21
22
# File 'lib/dbsketch/comparison/index_comparator.rb', line 20

def target
  @target
end