class Overapp::Project
Attributes
path[RW]
Public Class Methods
load(*args)
click to toggle source
# File lib/overapp/project.rb, line 17 def load(*args) new(*args) end
project?(path)
click to toggle source
# File lib/overapp/project.rb, line 12 def project?(path) raise "checking for project, path doesn't exist #{path}" unless FileTest.exist?(path) !!project_files.map { |x| "#{path}/#{x}" }.find { |x| FileTest.exist?(x) } end
project_files()
click to toggle source
# File lib/overapp/project.rb, line 8 def project_files %w(.fstemplate .overapp .overlay) end
Public Instance Methods
combined_files()
click to toggle source
# File lib/overapp/project.rb, line 66 def combined_files Write.new(:project => self).combined_files end
overapp_entries()
click to toggle source
# File lib/overapp/project.rb, line 38 def overapp_entries res = config.overapps local = config.overapps.find { |x| ['.',:self,path].include?(x.descriptor) } if local local.descriptor = path res else res + [ConfigEntry.new(:descriptor => path)] end end
overapps()
click to toggle source
# File lib/overapp/project.rb, line 52 def overapps overapp_entries.map do |entry| if path == entry.descriptor load_raw_dir_class.new(:descriptor => path) else load_factory_class.new(:descriptor => entry.descriptor, :type => entry.type, :entry_ops => entry.entry_ops).loader end end end
write_to!(output_path)
click to toggle source
# File lib/overapp/project.rb, line 62 def write_to!(output_path) Write.new(:output_path => output_path, :project => self).write! end