Class: Moku::Command::SetDefaultBranch

Inherits:
Command
  • Object
show all
Defined in:
lib/moku/command/set_default_branch.rb

Overview

Change the instance's default source branch

Instance Attribute Summary collapse

Attributes inherited from Command

#instance_name, #logger, #user

Instance Method Summary collapse

Methods inherited from Command

#authorized?, #instance

Constructor Details

#initialize(instance_name:, user:, new_branch:) ⇒ SetDefaultBranch

Returns a new instance of SetDefaultBranch.


11
12
13
14
# File 'lib/moku/command/set_default_branch.rb', line 11

def initialize(instance_name:, user:, new_branch:)
  super(instance_name: instance_name, user: user)
  @new_branch = new_branch
end

Instance Attribute Details

#new_branchObject (readonly)

Returns the value of attribute new_branch


16
17
18
# File 'lib/moku/command/set_default_branch.rb', line 16

def new_branch
  @new_branch
end

Instance Method Details

#actionObject


18
19
20
# File 'lib/moku/command/set_default_branch.rb', line 18

def action
  :set_default_branch
end

#instance_repoObject


22
23
24
# File 'lib/moku/command/set_default_branch.rb', line 22

def instance_repo
  Moku.instance_repo
end