Class: FPM::Cookery::Recipe

Inherits:
BaseRecipe show all
Extended by:
Forwardable
Defined in:
lib/fpm/cookery/recipe.rb

Instance Attribute Summary collapse

Attributes inherited from BaseRecipe

#filename

Attributes included from PathHelper

#installing, #omnibus_installing

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseRecipe

architectures, attr_rw, attr_rw_list, #builddir, #builddir=, #cachedir, #cachedir=, depends_all, #depends_all, #destdir, #destdir=, fpm_attributes, #fpm_attributes, inherited, #pkgdir, #pkgdir=, platform, platforms, #tmp_root, #tmp_root=, #workdir, #workdir=

Methods included from PathHelper

#bin, #doc, #etc, #include, #info, #installing?, #lib, #libexec, #man, #man1, #man2, #man3, #man4, #man5, #man6, #man7, #man8, #omnibus_installing?, #opt, #prefix, #root, #sbin, #share, #var, #with_trueprefix

Constructor Details

#initialize(filename, config) ⇒ Recipe

Returns a new instance of Recipe.



146
147
148
149
# File 'lib/fpm/cookery/recipe.rb', line 146

def initialize(filename, config)
  super(filename, config)
  @source_handler = SourceHandler.new(Source.new(source, spec), cachedir, builddir)
end

Instance Attribute Details

#source_handlerObject (readonly)

Returns the value of attribute source_handler.



164
165
166
# File 'lib/fpm/cookery/recipe.rb', line 164

def source_handler
  @source_handler
end

Class Method Details

.source(source = nil, spec = {}) ⇒ Object



152
153
154
155
156
# File 'lib/fpm/cookery/recipe.rb', line 152

def source(source = nil, spec = {})
  return @source if source.nil?
  @source = source
  @spec = spec
end

.urlObject



157
158
159
160
161
# File 'lib/fpm/cookery/recipe.rb', line 157

def source(source = nil, spec = {})
  return @source if source.nil?
  @source = source
  @spec = spec
end

Instance Method Details

#input(config) ⇒ Object



142
143
144
# File 'lib/fpm/cookery/recipe.rb', line 142

def input(config)
  FPM::Cookery::Package::Dir.new(self, config)
end

#sourceObject



160
161
162
# File 'lib/fpm/cookery/recipe.rb', line 160

def source
  self.class.source
end