Class: GuestUser

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



264
265
266
# File 'lib/redsafe.rb', line 264

def method_missing(m, *args)
  return false
end

Instance Method Details

#guest?Boolean

Returns:

  • (Boolean)


254
255
256
# File 'lib/redsafe.rb', line 254

def guest?
  true
end

#permission_levelObject



258
259
260
# File 'lib/redsafe.rb', line 258

def permission_level
  0
end