Class: Pkgr::Templates::DirTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/pkgr/templates/dir_template.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ DirTemplate

Returns a new instance of DirTemplate.



5
6
7
# File 'lib/pkgr/templates/dir_template.rb', line 5

def initialize(target)
  @target = target
end

Instance Attribute Details

#targetObject (readonly)

Returns the value of attribute target.



4
5
6
# File 'lib/pkgr/templates/dir_template.rb', line 4

def target
  @target
end

Instance Method Details

#install(template_binding) ⇒ Object



9
10
11
# File 'lib/pkgr/templates/dir_template.rb', line 9

def install(template_binding)
  FileUtils.mkdir_p(target)
end