Class: PasswordChanger::User

Inherits:
Object
  • Object
show all
Defined in:
lib/password_changer/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, old_password:, new_password:) ⇒ User

Returns a new instance of User.



7
8
9
10
11
# File 'lib/password_changer/user.rb', line 7

def initialize(name:, old_password:, new_password:)
  @name         = name
  @old_password = old_password
  @new_password = new_password
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/password_changer/user.rb', line 4

def name
  @name
end

#new_passwordObject

Returns the value of attribute new_password.



5
6
7
# File 'lib/password_changer/user.rb', line 5

def new_password
  @new_password
end

#old_passwordObject (readonly)

Returns the value of attribute old_password.



4
5
6
# File 'lib/password_changer/user.rb', line 4

def old_password
  @old_password
end