Class: GuestUser

Inherits:
Object
  • Object
show all
Defined in:
lib/sinatra-authentication.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)



287
288
289
# File 'lib/sinatra-authentication.rb', line 287

def method_missing(m, *args)
  return false
end

Instance Method Details

#guest?Boolean

Returns:

  • (Boolean)


277
278
279
# File 'lib/sinatra-authentication.rb', line 277

def guest?
  true
end

#permission_levelObject



281
282
283
# File 'lib/sinatra-authentication.rb', line 281

def permission_level
  0
end