Class: Login
- Inherits:
-
Object
- Object
- Login
- Defined in:
- app/models/login.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#have_password ⇒ Object
Returns the value of attribute have_password.
-
#password ⇒ Object
Returns the value of attribute password.
-
#remember ⇒ Object
Returns the value of attribute remember.
-
#return_to ⇒ Object
Returns the value of attribute return_to.
Instance Method Summary collapse
-
#initialize(args) ⇒ Login
constructor
A new instance of Login.
Constructor Details
#initialize(args) ⇒ Login
Returns a new instance of Login.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/models/login.rb', line 4 def initialize(args) if not args.nil? if args[:email] self.email = args[:email] end if args[:password] self.password = args[:password] end if args[:remember] self.remember = args[:remember] end if args[:return_to] self.return_to = args[:return_to] end if args[:have_password] self.have_password = args[:have_password] == "true" end end end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
2 3 4 |
# File 'app/models/login.rb', line 2 def email @email end |
#have_password ⇒ Object
Returns the value of attribute have_password.
2 3 4 |
# File 'app/models/login.rb', line 2 def have_password @have_password end |
#password ⇒ Object
Returns the value of attribute password.
2 3 4 |
# File 'app/models/login.rb', line 2 def password @password end |
#remember ⇒ Object
Returns the value of attribute remember.
2 3 4 |
# File 'app/models/login.rb', line 2 def remember @remember end |
#return_to ⇒ Object
Returns the value of attribute return_to.
2 3 4 |
# File 'app/models/login.rb', line 2 def return_to @return_to end |