Class: Rpub::Commands::Base

Inherits:
Object
  • Object
show all
Extended by:
SubclassTracker
Defined in:
lib/rpub/commands/base.rb

Direct Known Subclasses

Clean, Compile, Generate, Help, Main, Package, Preview, Stats

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from SubclassTracker

each, identifier, inherited, matching

Constructor Details

- (Base) initialize(options = [], stdout = $stdout)

A new instance of Base



8
9
10
# File 'lib/rpub/commands/base.rb', line 8

def initialize(options = [], stdout = $stdout)
  @options, @stdout = options, stdout
end

Instance Attribute Details

- (Object) options (readonly)

Returns the value of attribute options



6
7
8
# File 'lib/rpub/commands/base.rb', line 6

def options
  @options
end

Instance Method Details

- (Object) help



16
17
18
# File 'lib/rpub/commands/base.rb', line 16

def help
  puts parser
end

- (Object) invoke



12
13
14
# File 'lib/rpub/commands/base.rb', line 12

def invoke
  parser.parse!(options)
end