Skip to content

Instantly share code, notes, and snippets.

@d-konovalov
Created February 10, 2016 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d-konovalov/1b70b7b1f6bf16e150e3 to your computer and use it in GitHub Desktop.
Save d-konovalov/1b70b7b1f6bf16e150e3 to your computer and use it in GitHub Desktop.
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