Class: GuestUser

Inherits:
Object
  • Object
show all
Defined in:
lib/sinatra-authentication.rb,
lib/sinatra-authentication-o.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args) ⇒ Object

current_user.admin? returns false. current_user.has_a_baby? returns false. (which is a bit of an assumption I suppose)



302
303
304
# File 'lib/sinatra-authentication.rb', line 302

def method_missing(m, *args)
  return false
end

Instance Method Details

#guest?Boolean

Returns:

  • (Boolean)


292
293
294
# File 'lib/sinatra-authentication.rb', line 292

def guest?
  true
end

#permission_levelObject



296
297
298
# File 'lib/sinatra-authentication.rb', line 296

def permission_level
  0
end