Class: StillActive::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/still_active/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/still_active/options.rb', line 9

def initialize
  @options = {}
  @options_parser = OptionParser.new do |opts|
    add_banner(opts)
    add_tail_options(opts)
    add_gemfile_option(opts)
    add_gems_option(opts)
    add_output_options(opts)
    add_token_options(opts)
    add_parallelism_options(opts)
    add_range_options(opts)
    add_emoji_options(opts)
  end
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



7
8
9
# File 'lib/still_active/options.rb', line 7

def options
  @options
end

#options_parserObject

Returns the value of attribute options_parser.



7
8
9
# File 'lib/still_active/options.rb', line 7

def options_parser
  @options_parser
end

Instance Method Details

#parse!(args) ⇒ Object



24
25
26
27
28
# File 'lib/still_active/options.rb', line 24

def parse!(args)
  options_parser.parse!(args)
  validate_options
  options
end