Class: AnnotateGem::Options

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



8
9
10
11
12
13
14
15
16
# File 'lib/annotate_gem/options.rb', line 8

def initialize
  @options = {}
  @options_parser = OptionParser.new do |opts|
    add_banner(opts)
    add_tail_options(opts)
    add_info_options(opts)
    add_gemfile_comment_options(opts)
  end
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



6
7
8
# File 'lib/annotate_gem/options.rb', line 6

def options
  @options
end

#options_parserObject

Returns the value of attribute options_parser.



6
7
8
# File 'lib/annotate_gem/options.rb', line 6

def options_parser
  @options_parser
end

Instance Method Details

#parse!(args) ⇒ Object



18
19
20
21
22
# File 'lib/annotate_gem/options.rb', line 18

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