module Cog::Config::ProjectConfig
{Config} methods related to projects
Attributes
project_cogfile_path[R]
@return [String] path to the project's {DSL::Cogfile}
project_generator_path[R]
@return [String,nil] directory in which to place project generators
project_path[R]
@return [String] directory in which to place generated output. For example, the destination
parameter of {Generator#stamp} is relative to this path.
project_plugin_path[R]
@return [String,nil] directory in which to place project plugins
project_root[R]
@return [String] directory in which the project's {DSL::Cogfile} is found
project_template_path[R]
@return [String,nil] directory in which to place project templates
Public Instance Methods
project?()
click to toggle source
@return [Boolean] whether or not we operating in the context of a project
# File lib/cog/config/project_config.rb, line 26 def project? !@project_root.nil? end
supported_project_files()
click to toggle source
@return [Array<String>] list of paths to files in the {#project_path} which are written in a supported language
# File lib/cog/config/project_config.rb, line 31 def supported_project_files if project? exts = Cog.language_extensions.join ',' Dir.glob "#{Cog.project_path}/**/*.{#{exts}}" else [] end end
Private Instance Methods
path_if_for_project(path)
click to toggle source
# File lib/cog/config/project_config.rb, line 42 def path_if_for_project(path) path if path && path.start_with?(@project_root) end