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

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

Instance Method Summary collapse

Methods inherited from Base

#as_json, #id, #initialize

Constructor Details

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

Instance Method Details

#emailObject



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

def email
  @_source.email if logged_in?
end

#logged_in?Boolean

Returns:

  • (Boolean)


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

def logged_in?
  @_source.present?
end

#nameObject



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

def name
  @_source.name if logged_in?
end