Class: RGitFlow::Tasks::SCM

Inherits:
Object show all
Defined in:
lib/rgitflow/tasks/scm/tag.rb,
lib/rgitflow/tasks/scm/task.rb,
lib/rgitflow/tasks/scm/tasks.rb,
lib/rgitflow/tasks/scm/status.rb

Defined Under Namespace

Classes: Status, Tag, Task

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(git = nil) ⇒ SCM

Returns a new instance of SCM.



17
18
19
# File 'lib/rgitflow/tasks/scm/tasks.rb', line 17

def initialize(git = nil)
  @git = git || Git.open(Dir.pwd)
end

Class Attribute Details

.instanceObject

Returns the value of attribute instance.



8
9
10
# File 'lib/rgitflow/tasks/scm/tasks.rb', line 8

def instance
  @instance
end

Instance Attribute Details

#gitObject (readonly)

Returns the value of attribute git.



15
16
17
# File 'lib/rgitflow/tasks/scm/tasks.rb', line 15

def git
  @git
end

Class Method Details

.install_tasks(opts = {}) ⇒ Object



10
11
12
# File 'lib/rgitflow/tasks/scm/tasks.rb', line 10

def install_tasks(opts = {})
  new(opts[:git]).install
end

Instance Method Details

#installObject



21
22
23
24
# File 'lib/rgitflow/tasks/scm/tasks.rb', line 21

def install
  Status.new @git
  Tag.new @git
end