Class: HashDiff::Comparison

Inherits:
Struct
  • Object
show all
Defined in:
lib/hash_diff/comparison.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#leftObject

Returns the value of attribute left

Returns:

  • (Object)

    the current value of left



2
3
4
# File 'lib/hash_diff/comparison.rb', line 2

def left
  @left
end

#rightObject

Returns the value of attribute right

Returns:

  • (Object)

    the current value of right



2
3
4
# File 'lib/hash_diff/comparison.rb', line 2

def right
  @right
end

Instance Method Details

#diffObject



4
5
6
# File 'lib/hash_diff/comparison.rb', line 4

def diff
  @diff ||= differences(left, right)
end

#left_diffObject



8
9
10
11
# File 'lib/hash_diff/comparison.rb', line 8

def left_diff
  @concern = :left
  @left_diff ||= differences(left, right)
end

#right_diffObject



13
14
15
16
# File 'lib/hash_diff/comparison.rb', line 13

def right_diff
  @concern = :right
  @right_diff ||= differences(left, right)
end