Sha256: 521bbf8d982304181592588e11940e652f9c6efca3a28dbebe1a34784618dc7c

Contents?: true

Size: 597 Bytes

Versions: 9

Compression:

Stored size: 597 Bytes

Contents

module CMSScanner
  # User
  class User
    include Finders::Finding

    attr_accessor :password
    attr_reader :id, :username

    # @param [ String ] username
    # @param [ Hash ] opts
    # @option opts [ Integer ] :id
    # @option opts [ String ] :password
    def initialize(username, opts = {})
      @username = username
      @password = opts[:password]
      @id       = opts[:id]

      parse_finding_options(opts)
    end

    def ==(other)
      return false unless self.class == other.class

      username == other.username
    end

    def to_s
      username
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cms_scanner-0.0.41.4 app/models/user.rb
cms_scanner-0.0.41.3 app/models/user.rb
cms_scanner-0.0.41.2 app/models/user.rb
cms_scanner-0.0.41.1 app/models/user.rb
cms_scanner-0.0.41.0 app/models/user.rb
cms_scanner-0.0.40.3 app/models/user.rb
cms_scanner-0.0.40.2 app/models/user.rb
cms_scanner-0.0.40.1 app/models/user.rb
cms_scanner-0.0.40 app/models/user.rb