Class: Proctor::Managers

Inherits:
Object
  • Object
show all
Defined in:
lib/proctor/managers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app_files, params) ⇒ Managers

Returns a new instance of Managers.



8
9
10
11
12
13
14
# File 'lib/proctor/managers.rb', line 8

def initialize(app_files, params)
  @app_files = app_files
  @params    = params
  @all       = manager_list(app_files).map do |m|
    Manager.new(*m)
  end.sort {|a,b| a.name <=> b.name}
end

Instance Attribute Details

#allObject (readonly)

Returns the value of attribute all.



6
7
8
# File 'lib/proctor/managers.rb', line 6

def all
  @all
end

#app_filesObject (readonly)

Returns the value of attribute app_files.



6
7
8
# File 'lib/proctor/managers.rb', line 6

def app_files
  @app_files
end

Instance Method Details

#find_by_handle(handle) ⇒ Object



24
25
# File 'lib/proctor/managers.rb', line 24

def find_by_handle(handle)
end

#find_by_name(name) ⇒ Object



20
21
22
# File 'lib/proctor/managers.rb', line 20

def find_by_name(name)
  @all.find {|manager| manager.name == name}
end

#namesObject



16
17
18
# File 'lib/proctor/managers.rb', line 16

def names
  @all.map {|m| m.name}.sort
end