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, #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.



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

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.



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

def source_handler
  @source_handler
end

Class Method Details

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



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

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

.urlObject



138
139
140
141
142
# File 'lib/fpm/cookery/recipe.rb', line 138

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

Instance Method Details

#input(config) ⇒ Object



123
124
125
# File 'lib/fpm/cookery/recipe.rb', line 123

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

#sourceObject



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

def source
  self.class.source
end