Sha256: 6c837a639fe0f72a7a759fd38384e6a182a6016ed2a54b436ccc1da0fbdadcb4

Contents?: true

Size: 639 Bytes

Versions: 1

Compression:

Stored size: 639 Bytes

Contents

module Motion
  module Project
    class Config
      # HACK NEEDED since RubyMotion doesn't support full path
      # dependencies.
      def files_dependencies(deps_hash)
        res_path = lambda do |x|
          path = /^\.?\//.match(x) ? x : File.join('.', x)
          unless @files.include?(path)
            App.fail "Can't resolve dependency `#{x}' because #{path} is not in #{@files.inspect}"
          end
          path
        end
        deps_hash.each do |path, deps|
          deps = [deps] unless deps.is_a?(Array)
          @dependencies[res_path.call(path)] = deps.map(&res_path)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bubble-wrap-0.4.0 lib/bubble-wrap/ext/motion_project_config.rb