Class: GitReflow::Workflows::Core
- Inherits:
-
Object
- Object
- GitReflow::Workflows::Core
- Includes:
- GitReflow::Workflow
- Defined in:
- lib/git_reflow/workflows/core.rb
Overview
This class contains the core workflow for git-reflow. Going forward, this will act as the base class for customizing and extending git-reflow.
Class Method Summary collapse
-
.load_raw_workflow(workflow_string) ⇒ Object
Evaluates the provided string in the context of this class.
-
.load_workflow(workflow_path) ⇒ Object
Reads and evaluates the provided file in the context of this class.
Methods included from GitReflow::Workflow
Class Method Details
.load_raw_workflow(workflow_string) ⇒ Object
Evaluates the provided string in the context of this class
23 24 25 26 27 |
# File 'lib/git_reflow/workflows/core.rb', line 23 def self.load_raw_workflow(workflow_string) return if workflow_string.strip.empty? logger.debug "Evaluating workflow..." binding.eval(workflow_string) end |
.load_workflow(workflow_path) ⇒ Object
Reads and evaluates the provided file in the context of this class
14 15 16 17 18 |
# File 'lib/git_reflow/workflows/core.rb', line 14 def self.load_workflow(workflow_path) return unless workflow_path.length > 0 and File.exists?(workflow_path) logger.debug "Using workflow: #{workflow_path}" self.load_raw_workflow(File.read(workflow_path)) end |