Class: Proctor::Config::AppFiles

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

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ AppFiles

Returns a new instance of AppFiles.



8
9
10
# File 'lib/proctor/config/app_files.rb', line 8

def initialize(params)
  @all = path_list(params).map {|f| AppFile.new(f)}
end

Instance Method Details

#allObject



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

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

#find_by_handle(handle) ⇒ Object



24
25
26
# File 'lib/proctor/config/app_files.rb', line 24

def find_by_handle(handle)
  @all.find {|app_file| app_file.handle == handle}
end

#merged_dataObject



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

def merged_data
  @all.reduce({}) { |a,v| a.deep_merge(v.data) }
end

#path_list(params) ⇒ Object



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

def path_list(params)
  gem_app_path + cwd_app_path + commandline_app_path(params)
end