Top Level Namespace

Includes:
Config, RbConfig

Defined Under Namespace

Classes: GemHadar

Instance Method Summary collapse

Instance Method Details

#GemHadar(&block) ⇒ Object



26
27
28
# File 'lib/gem_hadar.rb', line 26

def GemHadar(&block)
  GemHadar.new(&block).create_all_tasks
end

#template(pathname, &block) ⇒ Object



847
848
849
850
851
852
853
854
855
856
# File 'lib/gem_hadar.rb', line 847

def template(pathname, &block)
  template_src = Pathname.new(pathname)
  template_dst = template_src.sub_ext('') # ignore ext, we just support erb anyway
  template_src == template_dst and raise ArgumentError,
    "pathname #{pathname.inspect} needs to have a file extension"
  file template_dst.to_s => template_src.to_s do
    GemHadar::TemplateCompiler.new(&block).compile(template_src, template_dst)
  end
  template_dst
end