Class: Admin

Inherits:
User show all
Defined in:
lib/admin.rb

Instance Attribute Summary collapse

Attributes inherited from User

#name

Instance Method Summary collapse

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_typeObject

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

#whoObject



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