Class: Textus::CLI::Group::Refresh

Inherits:
Textus::CLI::Group show all
Defined in:
lib/textus/cli/group/refresh.rb

Instance Attribute Summary

Attributes inherited from Verb

#positional

Instance Method Summary collapse

Methods inherited from Textus::CLI::Group

#call, needs_store?, subcommands

Methods inherited from Verb

command_name, #context_for, descendants, #emit, inherited, #initialize, needs_store?, #operations_for, option, options, parent_group, #resolved_role

Constructor Details

This class inherits a constructor from Textus::CLI::Verb

Instance Method Details

#parse(argv) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/textus/cli/group/refresh.rb', line 7

def parse(argv)
  if argv.first == "stale"
    argv.shift
    @sub_klass = Verb::RefreshStale
  else
    @sub_klass = Verb::Refresh
  end
  @sub = @sub_klass.new(stdin: @stdin, stdout: @stdout, stderr: @stderr, cwd: @cwd)
  @sub.parse(argv)
end