Last active
August 31, 2015 17:27
-
-
Save patricksrobertson/27d0ebfa698e1dbbb1ce to your computer and use it in GitHub Desktop.
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 PinVerifier | |
attr_reader :user | |
def initialize(user) | |
@user = user || NullVerifier.new | |
end | |
def valid?(pin) | |
user.valid_pin?(pin) | |
end | |
private | |
class NullVerifier | |
def valid_pin?(pin);false;end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment