Class: Contained::CLI::Base Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/contained/cli/base.rb

Overview

This class is abstract.

Direct Known Subclasses

Deploy, Init, Setup

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdin:, stdout:, argv:) ⇒ Base

Returns a new instance of Base.

Parameters:

  • stdin (IO)
  • stdout (IO)
  • argv (Array<String>)


17
18
19
20
21
# File 'lib/contained/cli/base.rb', line 17

def initialize(stdin:, stdout:, argv:)
  @stdin = stdin
  @stdout = stdout
  @argv = argv
end

Class Method Details

.handle!(stdin:, stdout:, argv:) ⇒ Object

Parameters:

  • stdin (IO)
  • stdout (IO)
  • argv (Array<String>)


10
11
12
# File 'lib/contained/cli/base.rb', line 10

def self.handle!(stdin:, stdout:, argv:)
  new(stdin: stdin, stdout: stdout, argv: argv).handle!
end

Instance Method Details

#handle!Object

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/contained/cli/base.rb', line 23

def handle!
  raise NotImplementedError, "#handle! undefined"
end