-
-
Save tai2/6a53fb8953ecb48c7a0e547eeba2b2bf to your computer and use it in GitHub Desktop.
unless considered harmful
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Muto | |
def initialize(sniper) | |
@sniper = sniper | |
end | |
def with_sniper? | |
@sniper | |
end | |
def without_sniper? | |
!@sniper | |
end | |
end | |
mu10 = Muto.new(true) | |
# no | |
if !mu10.with_sniper? | |
puts 'yes' | |
else | |
puts 'no' | |
end | |
# yes | |
unless mu10.without_sniper? | |
puts 'yes' | |
else | |
puts 'no' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment