Top Level Namespace

Includes:
Config, RbConfig

Defined Under Namespace

Classes: GemHadar

Instance Method Summary collapse

Instance Method Details

#GemHadar(&block) ⇒ Object



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

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

#template(pathname, &block) ⇒ Object



867
868
869
870
871
872
873
874
875
876
# File 'lib/gem_hadar.rb', line 867

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