Class: DiceBag::ConfigFile

Inherits:
Object
  • Object
show all
Includes:
DiceBagFile
Defined in:
lib/dice_bag/config_file.rb

Instance Attribute Summary

Attributes included from DiceBagFile

#file, #filename

Instance Method Summary collapse

Methods included from DiceBagFile

#assert_existence, #should_write?, #write

Constructor Details

#initialize(name) ⇒ ConfigFile

Returns a new instance of ConfigFile.


9
10
11
12
13
14
# File 'lib/dice_bag/config_file.rb', line 9

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