Method: Thor::Options#peek

Defined in:
lib/thor/parser/options.rb

#peekObject



65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/thor/parser/options.rb', line 65

def peek
  return super unless @parsing_options

  result = super
  if result == OPTS_END
    shift
    @parsing_options = false
    @stopped_parsing_after_extra_index ||= @extra.size
    super
  else
    result
  end
end