Class: Admin
Instance Attribute Summary collapse
-
#admin_type ⇒ Object
Returns the value of attribute admin_type.
Attributes inherited from User
Instance Method Summary collapse
-
#initialize(name) ⇒ Admin
constructor
A new instance of Admin.
- #manage_user(user) ⇒ Object
- #who ⇒ Object
Methods inherited from User
#check_who, #login, #login?, #loginx?, #logout
Constructor Details
#initialize(name) ⇒ Admin
10 11 12 |
# File 'lib/admin.rb', line 10 def initialize(name) super(name) end |
Instance Attribute Details
#admin_type ⇒ Object
Returns the value of attribute admin_type.
8 9 10 |
# File 'lib/admin.rb', line 8 def admin_type @admin_type end |
Instance Method Details
#manage_user(user) ⇒ Object
14 15 16 |
# File 'lib/admin.rb', line 14 def manage_user(user) puts "manage user #{user.name}" end |
#who ⇒ Object
18 19 20 21 22 |
# File 'lib/admin.rb', line 18 def who Service::UserService.new.to_string super puts 'i am an admin' end |