Class: User

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/wpb/user.rb

Overview

This class is used for getting the user from the wordpress database

Examples:

User.find(1).name

The above will find the user with id of 1 and retrieve their display name

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inspectObject



13
14
15
# File 'lib/wpb/user.rb', line 13

def inspect
  "User(id: integer, name: string, username: string, email: string)"
end

Instance Method Details

#inspectObject



30
31
32
# File 'lib/wpb/user.rb', line 30

def inspect
 "#<User id: #{id}, name: \"#{name}\", username: \"#{username}\", email: \"#{email}\">"
end