Class: Mxrb::Compare::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/mxrb/compare.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#changesObject

Returns the value of attribute changes

Returns:

  • (Object)

    the current value of changes



13
14
15
# File 'lib/mxrb/compare.rb', line 13

def changes
  @changes
end

#differencesObject

Returns the value of attribute differences

Returns:

  • (Object)

    the current value of differences



13
14
15
# File 'lib/mxrb/compare.rb', line 13

def differences
  @differences
end

Instance Method Details

#addedObject



15
# File 'lib/mxrb/compare.rb', line 15

def added = changes.select(&:added?)

#changedObject



17
# File 'lib/mxrb/compare.rb', line 17

def changed = changes.select(&:changed?)

#identical?Boolean

Returns:

  • (Boolean)


14
# File 'lib/mxrb/compare.rb', line 14

def identical? = differences.empty?

#removedObject



16
# File 'lib/mxrb/compare.rb', line 16

def removed = changes.select(&:removed?)