Class: DiceBag::ConfigFile
- Inherits:
-
Object
- Object
- DiceBag::ConfigFile
- Includes:
- DiceBagFile
- Defined in:
- lib/dice_bag/config_file.rb
Instance Attribute Summary
Attributes included from DiceBagFile
#destination, #file, #filename
Instance Method Summary collapse
-
#initialize(name) ⇒ ConfigFile
constructor
A new instance of ConfigFile.
Methods included from DiceBagFile
#assert_existence, #should_write?, #write
Constructor Details
#initialize(name) ⇒ ConfigFile
Returns a new instance of ConfigFile.
11 12 13 14 15 16 |
# File 'lib/dice_bag/config_file.rb', line 11 def initialize(name) # The 'local', 'erb', and 'template' file extension are deprecated and # will be removed some time prior to v1. @filename = name.gsub(".local", "").gsub(".erb", "").gsub(".template", "").gsub(".dice", "") @file = Project.config_files(@filename) end |