3

I need create a conditional with a logical implication. I have four cases:

  if(true and true)
    #enter
  end

  if(true and false)
    #don't enter
  end

  if(false and true)
    #enter
  end

  if(false and false)
    #enter
  end

How I can make this?

Luiz Carvalho
  • 1,549
  • 1
  • 23
  • 46
  • 1
    Please you can follow this link [How can I write a switch statement in Ruby?][1] Best of luck! [1]: http://stackoverflow.com/questions/948135/how-can-i-write-a-switch-statement-in-ruby – kablu May 16 '14 at 17:32

1 Answers1

3

The expression a → b is the same as not a or b.

Is that what you want?

Borodin
  • 126,100
  • 9
  • 70
  • 144