Class: DiceBag::Project
- Inherits:
-
Object
- Object
- DiceBag::Project
- Defined in:
- lib/dice_bag/project.rb
Constant Summary collapse
- DEFAULT_NAME =
'project'
Class Method Summary collapse
Class Method Details
.config_files(filename) ⇒ Object
12 13 14 |
# File 'lib/dice_bag/project.rb', line 12 def self.config_files(filename) File.join(self.root, filename) end |
.name ⇒ Object
7 8 9 10 |
# File 'lib/dice_bag/project.rb', line 7 def self.name #TODO: how to do find the name of the project in no-rails environments? defined?(Rails) ? Rails.application.class.parent_name.downcase : DEFAULT_NAME end |
.root ⇒ Object
16 17 18 |
# File 'lib/dice_bag/project.rb', line 16 def self.root Dir.pwd end |
.templates_to_generate ⇒ Object
20 21 22 |
# File 'lib/dice_bag/project.rb', line 20 def self.templates_to_generate Dir['**/*.dice'] end |