Class: CMSScanner::User
- Inherits:
-
Object
- Object
- CMSScanner::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.
13 14 15 16 17 18 19 |
# File 'app/models/user.rb', line 13 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.
7 8 9 |
# File 'app/models/user.rb', line 7 def id @id end |
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'app/models/user.rb', line 6 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
7 8 9 |
# File 'app/models/user.rb', line 7 def username @username end |
Instance Method Details
#==(other) ⇒ Object
21 22 23 24 25 |
# File 'app/models/user.rb', line 21 def ==(other) return false unless self.class == other.class username == other.username end |
#to_s ⇒ Object
27 28 29 |
# File 'app/models/user.rb', line 27 def to_s username end |