Class: MotionParse::User

Inherits:
Base
  • Object
show all
Defined in:
lib/motion-parse/user.rb

Instance Attribute Summary

Attributes inherited from Base

#parse_object

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, attribute, find, get, has_many, query

Constructor Details

#initializeUser

Returns a new instance of User.



5
6
7
# File 'lib/motion-parse/user.rb', line 5

def initialize
  super(PFUser.user)
end

Class Method Details

.currentObject



9
10
11
12
13
14
15
16
17
# File 'lib/motion-parse/user.rb', line 9

def self.current
  if PFUser.currentUser
    new.tap do |u|
      u.parse_object = PFUser.currentUser
    end
  else
    return nil
  end
end