class WpUser

Attributes

display_name[RW]
id[RW]
login[RW]
password[RW]

Public Instance Methods

<=>(other) click to toggle source

@param [ WpUser ] other

# File lib/common/models/wp_user.rb, line 37
def <=>(other)
  id <=> other.id
end
==(other) click to toggle source

@param [ WpUser ] other

@return [ Boolean ]

# File lib/common/models/wp_user.rb, line 44
def ==(other)
  self === other
end
===(other) click to toggle source

@param [ WpUser ] other

@return [ Boolean ]

# File lib/common/models/wp_user.rb, line 51
def ===(other)
  id === other.id && login === other.login
end
allowed_options() click to toggle source

@return [ Array<Symbol> ]

# File lib/common/models/wp_user.rb, line 12
def allowed_options; [:id, :login, :display_name, :password] end
login_url() click to toggle source

@return [ String ]

# File lib/common/models/wp_user.rb, line 24
def login_url
  @uri.merge('wp-login.php').to_s
end
to_s() click to toggle source

@return [ String ]

# File lib/common/models/wp_user.rb, line 29
def to_s
  s  = "#{id}"
  s += " | #{login}" if login
  s += " | #{display_name}" if display_name
  s
end
uri() click to toggle source

@return [ URI ] The uri to the auhor page

# File lib/common/models/wp_user.rb, line 15
def uri
  if id
    return @uri.merge("?author=#{id}")
  else
    raise 'The id is nil'
  end
end