Class: AdminUser
- Inherits:
-
Object
- Object
- AdminUser
- Defined in:
- bin/zmb
Instance Attribute Summary collapse
-
#permissions ⇒ Object
Returns the value of attribute permissions.
-
#userhosts ⇒ Object
Returns the value of attribute userhosts.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #admin? ⇒ Boolean
- #authenticated? ⇒ Boolean
-
#initialize ⇒ AdminUser
constructor
A new instance of AdminUser.
- #permission?(perm) ⇒ Boolean
Constructor Details
#initialize ⇒ AdminUser
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
#permissions ⇒ Object
Returns the value of attribute permissions.
9 10 11 |
# File 'bin/zmb', line 9 def @permissions end |
#userhosts ⇒ Object
Returns the value of attribute userhosts.
9 10 11 |
# File 'bin/zmb', line 9 def userhosts @userhosts end |
#username ⇒ Object
Returns the value of attribute username.
9 10 11 |
# File 'bin/zmb', line 9 def username @username end |
Instance Method Details
#admin? ⇒ Boolean
17 18 19 |
# File 'bin/zmb', line 17 def admin? true end |
#authenticated? ⇒ Boolean
25 26 27 |
# File 'bin/zmb', line 25 def authenticated? true end |
#permission?(perm) ⇒ Boolean
21 22 23 |
# File 'bin/zmb', line 21 def (perm) true end |