Class: Pkgr::Templates::DirTemplate
- Inherits:
-
Object
- Object
- Pkgr::Templates::DirTemplate
- Defined in:
- lib/pkgr/templates/dir_template.rb
Instance Attribute Summary collapse
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target) ⇒ DirTemplate
constructor
A new instance of DirTemplate.
- #install(template_binding) ⇒ Object
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
#target ⇒ Object (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 |