class Overapp::Load::Factory

Attributes

descriptor[RW]
entry_ops[RW]
type[RW]

Public Instance Methods

loader() click to toggle source
# File lib/overapp/load/factory.rb, line 7
def loader
  raise "bad #{descriptor}" if descriptor.blank?
  if type.to_s.to_sym == :command
    Command.new(:descriptor => descriptor).tap { |x| x.relative_output_path = entry_ops[:path] if entry_ops[:path].present? }
  elsif Git.repo?(descriptor)
    Repo.new(:descriptor => descriptor)
  else
    LocalDir.new(:descriptor => descriptor)
  end
end