Class: Proctor::Services

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

Instance Method Summary collapse

Constructor Details

#initialize(app_files, params) ⇒ Services

Returns a new instance of Services.



6
7
8
9
10
# File 'lib/proctor/services.rb', line 6

def initialize(app_files, params)
  @app_files = app_files
  @params    = params
  @all       = service_list(app_files).map {|m| Service.new(*m)}
end

Instance Method Details

#allObject



12
13
14
# File 'lib/proctor/services.rb', line 12

def all
  @all.sort {|a,b| a.name <=> b.name}
end

#find_by_handle(handle) ⇒ Object



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

def find_by_handle(handle)
end

#find_by_name(name) ⇒ Object



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

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

#namesObject



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

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