diffy icon indicating copy to clipboard operation
diffy copied to clipboard

Use Diffy to get true or false for if statement.

Open moos3 opened this issue 13 years ago • 1 comments

Is it possible to get a example of true or false if statement using diffy ? I'm working on a project that just needs to check if theres a difference if so then take a action.

moos3 avatar Jun 26 '12 13:06 moos3

It sounds like all you're really trying to do here is see if two strings or files are equal. You'd probably be better off just using ruby equality for this, and cutting diffy out of the equation.

e.g.

if string1 == string2
  #handle equality
else
  #handle difference
end

samg avatar Jun 30 '12 17:06 samg