class DiceBag::Project
Constants
- DEFAULT_NAME
Public Class Methods
config_files(filename)
click to toggle source
# File lib/dice_bag/project.rb, line 16 def self.config_files(filename) File.join(root, filename) end
name()
click to toggle source
TODO: how to find the name of the project in non Rails apps?
# File lib/dice_bag/project.rb, line 9 def self.name return DEFAULT_NAME unless defined?(Rails) parent_name_method = Module.respond_to?(:module_parent_name) ? :module_parent_name : :parent_name Rails.application.class.send(parent_name_method).downcase end
root()
click to toggle source
# File lib/dice_bag/project.rb, line 20 def self.root Dir.pwd end
templates_to_generate()
click to toggle source
# File lib/dice_bag/project.rb, line 24 def self.templates_to_generate FileList.new("**/*.dice") do |fl| fl.exclude(File.join(Bundler.settings[:path], "/**/*")) if defined?(Bundler) && Bundler.settings[:path] end end