Class: HustleAndFlow::Commands::Ready

Inherits:
Object
  • Object
show all
Defined in:
lib/hustle_and_flow/commands/ready.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(io:, **args) ⇒ Ready

Returns a new instance of Ready.



10
11
12
13
# File 'lib/hustle_and_flow/commands/ready.rb', line 10

def initialize(io:, **args)
  self.io      = io
  self.options = args
end

Instance Attribute Details

#ioObject

Returns the value of attribute io.



7
8
9
# File 'lib/hustle_and_flow/commands/ready.rb', line 7

def io
  @io
end

#optionsObject

Returns the value of attribute options.



7
8
9
# File 'lib/hustle_and_flow/commands/ready.rb', line 7

def options
  @options
end

Instance Method Details

#callObject



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/hustle_and_flow/commands/ready.rb', line 15

def call
  repo = VersionControl.new(path: Dir.pwd)
  VersionControls::Commands::Ready.call \
    io:              io,
    repo:            repo
  IssueTrackers::Commands::Ready.call \
    io:              io,
    repo:            repo,
    me:              repo.user,
    branch_name:     repo.current_branch.name,
    overwritten:     [],
    options:         options
end