Class: RGitFlow::Install
- Includes:
- Printing
- Defined in:
- lib/rgitflow/install.rb
Constant Summary
Constants included from Printing
Printing::DEBUG_PREFIX, Printing::ERROR_PREFIX, Printing::INPUT_PREFIX, Printing::STATUS_PREFIX
Class Attribute Summary collapse
-
.instance ⇒ Object
Returns the value of attribute instance.
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#git ⇒ Object
readonly
Returns the value of attribute git.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dir = nil) ⇒ Install
constructor
A new instance of Install.
- #install ⇒ Object
Methods included from Printing
#debug, #error, #prompt, #status
Constructor Details
#initialize(dir = nil) ⇒ Install
Returns a new instance of Install.
18 19 20 21 |
# File 'lib/rgitflow/install.rb', line 18 def initialize(dir = nil) @dir = dir || Dir.pwd @git = Git.open @dir end |
Class Attribute Details
.instance ⇒ Object
Returns the value of attribute instance.
9 10 11 |
# File 'lib/rgitflow/install.rb', line 9 def instance @instance end |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
16 17 18 |
# File 'lib/rgitflow/install.rb', line 16 def dir @dir end |
#git ⇒ Object (readonly)
Returns the value of attribute git.
16 17 18 |
# File 'lib/rgitflow/install.rb', line 16 def git @git end |
Class Method Details
.install_tasks(opts = {}) ⇒ Object
11 12 13 |
# File 'lib/rgitflow/install.rb', line 11 def install_tasks(opts = {}) new(opts[:dir]).install end |
Instance Method Details
#install ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rgitflow/install.rb', line 23 def install require 'rgitflow/tasks/scm/tasks' RGitFlow::Tasks::SCM.install_tasks :git => @git require 'rgitflow/tasks/feature/tasks' RGitFlow::Tasks::Feature.install_tasks :git => @git require 'rgitflow/tasks/hotfix/tasks' RGitFlow::Tasks::Hotfix.install_tasks :git => @git require 'rgitflow/tasks/release/tasks' RGitFlow::Tasks::Release.install_tasks :git => @git end |