Class: FPM::Cookery::SourceHandler
- Inherits:
-
Object
- Object
- FPM::Cookery::SourceHandler
- Extended by:
- Forwardable
- Defined in:
- lib/fpm/cookery/source_handler.rb,
lib/fpm/cookery/source_handler/hg.rb,
lib/fpm/cookery/source_handler/git.rb,
lib/fpm/cookery/source_handler/svn.rb,
lib/fpm/cookery/source_handler/curl.rb,
lib/fpm/cookery/source_handler/noop.rb,
lib/fpm/cookery/source_handler/template.rb,
lib/fpm/cookery/source_handler/local_path.rb
Defined Under Namespace
Classes: Curl, Git, Hg, LocalPath, Noop, Svn, Template
Constant Summary collapse
- DEFAULT_HANDLER =
:curl
- LOCAL_HANDLER =
:local_path
Instance Attribute Summary collapse
-
#source_url ⇒ Object
readonly
Returns the value of attribute source_url.
Instance Method Summary collapse
-
#initialize(source, cachedir, builddir) ⇒ SourceHandler
constructor
A new instance of SourceHandler.
Constructor Details
#initialize(source, cachedir, builddir) ⇒ SourceHandler
Returns a new instance of SourceHandler.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/fpm/cookery/source_handler.rb', line 21 def initialize(source, cachedir, builddir) @source = source @cachedir = cachedir @builddir = builddir if @source.provider? @source_provider = @source.provider elsif @source.local? @source_provider = LOCAL_HANDLER else @source_provider = DEFAULT_HANDLER end @handler = get_source_handler(@source_provider) end |
Instance Attribute Details
#source_url ⇒ Object (readonly)
Returns the value of attribute source_url.
19 20 21 |
# File 'lib/fpm/cookery/source_handler.rb', line 19 def source_url @source_url end |