Top Level Namespace

Includes:
Config, RbConfig

Defined Under Namespace

Classes: GemHadar

Instance Method Summary collapse

Instance Method Details

#GemHadar(&block) ⇒ Object



24
25
26
# File 'lib/gem_hadar.rb', line 24

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

#template(pathname, &block) ⇒ Object



778
779
780
781
782
783
784
785
786
787
# File 'lib/gem_hadar.rb', line 778

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