Method: Jsus::Container#required_files
- Defined in:
- lib/jsus/container.rb
#required_files(root = nil) ⇒ Array
Lists all the required files (dependencies and extensions) for the sources in the container. Consider it a projection from source files space onto filesystem space.
Optionally accepts a filesystem point to calculate relative paths from.
93 94 95 96 97 98 99 100 101 |
# File 'lib/jsus/container.rb', line 93 def required_files(root = nil) sort! files = sources.map {|s| s.required_files }.flatten if root root = Pathname.new(File.(root)) files = files.map {|f| Pathname.new(File.(f)).relative_path_from(root).to_s } end files end |