Class: Prebundler::Cli::Base

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

Direct Known Subclasses

Install, List, Subset

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(out, global_options, options, args) ⇒ Base

Returns a new instance of Base.



12
13
14
15
16
17
# File 'lib/prebundler/cli/base.rb', line 12

def initialize(out, global_options, options, args)
  @out = out
  @global_options = global_options
  @options = options
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



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

def args
  @args
end

#global_optionsObject (readonly)

Returns the value of attribute global_options.



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

def global_options
  @global_options
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

#outObject (readonly)

Returns the value of attribute out.



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

def out
  @out
end

Class Method Details

.run(out, global_options, options, args) ⇒ Object



5
6
7
# File 'lib/prebundler/cli/base.rb', line 5

def run(out, global_options, options, args)
  new(out, global_options, options, args).run
end

Instance Method Details

#runObject

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/prebundler/cli/base.rb', line 19

def run
  raise NotImplementedError, "please define '#{__method__}' in derived classes"
end