Module: FPM::Fry::Plugin::ScriptHelper

Defined in:
lib/fpm/fry/plugin/script_helper.rb

Defined Under Namespace

Modules: DebianRenderer, RedhatRenderer, RenderErb Classes: AfterInstall, AfterRemove, BeforeInstall, BeforeRemove, DSL, Script

Constant Summary collapse

NAME_TO_SCRIPT =
{
  before_install: BeforeInstall,
  after_install: AfterInstall,
  before_remove: BeforeRemove,
  after_remove: AfterRemove
}
SCRIPT_TO_NAME =
NAME_TO_SCRIPT.invert

Class Method Summary collapse

Class Method Details

.apply(builder, options = {}, &block) ⇒ Object



166
167
168
169
170
171
172
173
174
175
# File 'lib/fpm/fry/plugin/script_helper.rb', line 166

def self.apply(builder, options = {}, &block)
  dsl = DSL.new(builder)
  if block
    if block.arity == 1 
      yield dsl
    else
      dsl.instance_eval(&block)
    end
  end
end