Class: FakeUser

Inherits:
Object show all
Includes:
Typus::Orm::ActiveRecord::User::InstanceMethodsMore
Defined in:
lib/support/fake_user.rb

Instance Method Summary collapse

Methods included from Typus::Orm::ActiveRecord::User::InstanceMethodsMore

#locale, #role

Instance Method Details

#application(name) ⇒ Object



31
32
33
# File 'lib/support/fake_user.rb', line 31

def application(name)
  Typus.application(name)
end

#applicationsObject



27
28
29
# File 'lib/support/fake_user.rb', line 27

def applications
  Typus.applications
end

#can?(*args) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/support/fake_user.rb', line 11

def can?(*args)
  true
end

#cannot?(*args) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/support/fake_user.rb', line 15

def cannot?(*args)
  !can?(*args)
end

#idObject



7
8
9
# File 'lib/support/fake_user.rb', line 7

def id
  0
end

#is_not_root?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/support/fake_user.rb', line 23

def is_not_root?
  !is_root?
end

#is_root?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/support/fake_user.rb', line 19

def is_root?
  true
end

#owns?(resource) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/support/fake_user.rb', line 39

def owns?(resource)
  true
end

#statusObject



35
36
37
# File 'lib/support/fake_user.rb', line 35

def status
  true
end