Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Diffy to get true or false for if statement. #11

Open
moos3 opened this issue Jun 26, 2012 · 1 comment
Open

Use Diffy to get true or false for if statement. #11

moos3 opened this issue Jun 26, 2012 · 1 comment

Comments

@moos3
Copy link

moos3 commented Jun 26, 2012

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.

@samg
Copy link
Owner

samg commented Jun 30, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants