class FPM::Fry::Plugin::Config::DSL

Public Class Methods

new( builder, options ) click to toggle source
Calls superclass method
# File lib/fpm/fry/plugin/config.rb, line 69
def initialize( builder, options )
  callback = builder.output_hooks.find{|h| h.kind_of? Callback }
  if !callback
    callback = Callback.new({'etc' => true})
    builder.output_hooks << callback
  end
  # This looks kind of dirty. The callback tells the cook comamnd that the
  # user has explictly used the config plugin. This way the cook command
  # can hint the user to use this plugin if config files were automatically
  # added.
  if !options[IMPLICIT]
    builder.output_hooks << MARK_EXPLICIT
  end
  super( builder, options, callback )
end

Public Instance Methods

exclude( path ) click to toggle source
# File lib/fpm/fry/plugin/config.rb, line 92
def exclude( path )
  if path[0] == "/"
    path = path[1..-1]
  end
  callback.files[path] = false
end
include( path ) click to toggle source
# File lib/fpm/fry/plugin/config.rb, line 85
def include( path )
  if path[0] == "/"
    path = path[1..-1]
  end
  callback.files[path] = true
end