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=, #pkgdir, #pkgdir=, platform, platforms, #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) ⇒ Recipe

Returns a new instance of Recipe.



119
120
121
122
# File 'lib/fpm/cookery/recipe.rb', line 119

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

Instance Attribute Details

#source_handlerObject (readonly)

Returns the value of attribute source_handler.



137
138
139
# File 'lib/fpm/cookery/recipe.rb', line 137

def source_handler
  @source_handler
end

Class Method Details

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



125
126
127
128
129
# File 'lib/fpm/cookery/recipe.rb', line 125

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

.urlObject



130
131
132
133
134
# File 'lib/fpm/cookery/recipe.rb', line 130

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

Instance Method Details

#input(config) ⇒ Object



115
116
117
# File 'lib/fpm/cookery/recipe.rb', line 115

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

#sourceObject



133
134
135
# File 'lib/fpm/cookery/recipe.rb', line 133

def source
  self.class.source
end