class Zeli::Parser::ParamParser
Public Class Methods
new(option)
click to toggle source
# File lib/zeli/parsers/param_parser.rb, line 4 def initialize(option) @option = option end
Public Instance Methods
parse!(raw_curl, curl)
click to toggle source
# File lib/zeli/parsers/param_parser.rb, line 8 def parse!(raw_curl, curl) @raw_curl = raw_curl @curl = curl value.each do |value| @curl.options << Zeli::Option.new(@option, value) end @curl end
Private Instance Methods
value()
click to toggle source
# File lib/zeli/parsers/param_parser.rb, line 21 def value result = @raw_curl.scan(/\s#{@option}\ (.*)(\\)(\s?)/) result.map &:first end