Class: AdminUser

Inherits:
Object
  • Object
show all
Defined in:
bin/zmb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAdminUser

Returns a new instance of AdminUser.



11
12
13
14
15
# File 'bin/zmb', line 11

def initialize
  @username = 'admin'
  @userhosts = []
  @permissions = ['admin']
end

Instance Attribute Details

#permissionsObject

Returns the value of attribute permissions.



9
10
11
# File 'bin/zmb', line 9

def permissions
  @permissions
end

#userhostsObject

Returns the value of attribute userhosts.



9
10
11
# File 'bin/zmb', line 9

def userhosts
  @userhosts
end

#usernameObject

Returns the value of attribute username.



9
10
11
# File 'bin/zmb', line 9

def username
  @username
end

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'bin/zmb', line 17

def admin?
  true
end

#authenticated?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'bin/zmb', line 25

def authenticated?
  true
end

#permission?(perm) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'bin/zmb', line 21

def permission?(perm)
  true
end