Top Level Namespace

Defined Under Namespace

Modules: Challenger

Instance Method Summary collapse

Instance Method Details

#set_default(name, *args, &block) ⇒ Object



6
7
8
# File 'lib/challenger/recipes/base.rb', line 6

def set_default(name, *args, &block)
  set(name, *args, &block) unless exists?(name)
end

#template(from, to) ⇒ Object



1
2
3
4
# File 'lib/challenger/recipes/base.rb', line 1

def template(from, to)
  erb = File.read(File.expand_path("../../templates/#{from}", __FILE__))
  put ERB.new(erb).result(binding), to
end