class Zeli::Parser::OptionParser

Public Class Methods

new(option) click to toggle source
# File lib/zeli/parsers/option_parser.rb, line 4
def initialize(option)
  @option = option
end

Public Instance Methods

matches?() click to toggle source
# File lib/zeli/parsers/option_parser.rb, line 19
def matches?
  @raw_curl.include? @option
end
parse!(raw_curl, curl) click to toggle source
# File lib/zeli/parsers/option_parser.rb, line 8
def parse!(raw_curl, curl)
  @raw_curl = raw_curl
  @curl = curl

  if matches?
    @curl.options << Zeli::Option.new(@option, nil)
  end

  @curl
end