Class: CMSScanner::Model::User
- Inherits:
-
Object
- Object
- CMSScanner::Model::User
- Includes:
- Finders::Finding
- Defined in:
- app/models/user.rb
Overview
User
Constant Summary
Constants included from Finders::Finding
Finders::Finding::FINDING_OPTS
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(username, opts = {}) ⇒ User
constructor
A new instance of User.
- #to_s ⇒ Object
Methods included from Finders::Finding
#<=>, #confidence, #confidence=, #confirmed_by, #eql?, included, #interesting_entries, #parse_finding_options
Constructor Details
#initialize(username, opts = {}) ⇒ User
Returns a new instance of User.
16 17 18 19 20 21 22 |
# File 'app/models/user.rb', line 16 def initialize(username, opts = {}) @username = username @password = opts[:password] @id = opts[:id] (opts) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'app/models/user.rb', line 10 def id @id end |
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'app/models/user.rb', line 9 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
10 11 12 |
# File 'app/models/user.rb', line 10 def username @username end |
Instance Method Details
#==(other) ⇒ Object
24 25 26 27 28 |
# File 'app/models/user.rb', line 24 def ==(other) return false unless self.class == other.class username == other.username && password == other.password end |
#to_s ⇒ Object
30 31 32 |
# File 'app/models/user.rb', line 30 def to_s username end |