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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SubclassTracker

each, identifier, inherited, matching

Constructor Details

#initialize(options = [], stdout = $stdout) ⇒ Base

Returns 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

#optionsObject (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

#helpObject



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

def help
  puts parser
end

#invokeObject



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

def invoke
  parser.parse!(options)
end