Created
February 10, 2016 07:37
-
-
Save d-konovalov/aa37e6622c539fd0b20a 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 User | |
attr_accessor :first_name, :last_name, :email | |
def initialize(options) | |
@first_name = options[:first_name] | |
@last_name = options[:last_name] | |
@email = options[:email] | |
end | |
def registered? | |
@registered ||= false | |
end | |
def active? | |
@active.nil? ? true : @active | |
end | |
def deactivate | |
@active = false | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment