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=, environment, #environment, fpm_attributes, #fpm_attributes, inherited, #pkgdir, #pkgdir=, platform, platforms, #tmp_root, #tmp_root=, #workdir, #workdir=

Methods included from LifecycleHooks

#after_dependency_installation, #before_dependency_installation, #run_lifecycle_hook

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.



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

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.



186
187
188
# File 'lib/fpm/cookery/recipe.rb', line 186

def source_handler
  @source_handler
end

Class Method Details

.extracted_source(path = nil) ⇒ Object



172
173
174
175
# File 'lib/fpm/cookery/recipe.rb', line 172

def extracted_source(path = nil)
  return @extracted_source if path.nil?
  @extracted_source = path
end

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



165
166
167
168
169
# File 'lib/fpm/cookery/recipe.rb', line 165

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

.urlObject



170
171
172
173
174
# File 'lib/fpm/cookery/recipe.rb', line 170

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

Instance Method Details

#extracted_sourceObject



182
183
184
# File 'lib/fpm/cookery/recipe.rb', line 182

def extracted_source
  self.class.extracted_source
end

#input(config) ⇒ Object



155
156
157
# File 'lib/fpm/cookery/recipe.rb', line 155

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

#sourceObject



178
179
180
# File 'lib/fpm/cookery/recipe.rb', line 178

def source
  self.class.source
end