Class: Tenma::Prepare::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/tenma/prepare/command.rb

Instance Method Summary collapse

Constructor Details

#initialize(cli) ⇒ Command

Returns a new instance of Command.



10
11
12
# File 'lib/tenma/prepare/command.rb', line 10

def initialize(cli)
  @cli = cli
end

Instance Method Details

#executeObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/tenma/prepare/command.rb', line 14

def execute
  @context = Tenma::Prepare::Context.new.load!(@cli.options)
  if @context.options.create_kpt_issue?
    Tenma::Prepare::KptIssue.new(@context).create
  end

  if @context.options.create_release_issue?
    Tenma::Prepare::ReleaseIssue.new(@context).create
  end

  if @context.options.create_release_branch?
    Tenma::Prepare::ReleaseBranch.new(@context).create
  end

  if @context.options.create_release_pullreqs?
    Tenma::Prepare::ReleasePullreqs.new(@context).create
  end
end