Class: Locomotive::Liquid::Drops::CurrentUser

Inherits:
Base
  • Object
show all
Defined in:
lib/locomotive/liquid/drops/current_user.rb

Instance Method Summary collapse

Methods inherited from Base

#id, #initialize, liquify

Constructor Details

This class inherits a constructor from Locomotive::Liquid::Drops::Base

Instance Method Details

#emailObject



14
15
16
# File 'lib/locomotive/liquid/drops/current_user.rb', line 14

def email
  @_source.email if logged_in?
end

#logged_in?Boolean

Returns:



6
7
8
# File 'lib/locomotive/liquid/drops/current_user.rb', line 6

def logged_in?
  @_source.present?
end

#nameObject



10
11
12
# File 'lib/locomotive/liquid/drops/current_user.rb', line 10

def name
  @_source.name if logged_in?
end