def generate_command(url, *args, **options)
      command = %W[wget --no-verbose --save-headers -O -]

      options = @arguments.grep(Hash).inject({}, :merge).merge(options)
      args    = @arguments.grep(->(o){!o.is_a?(Hash)}) + args

      (args + options.to_a).each do |option, value|
        if option.is_a?(String)
          command << option
        elsif option.length == 1
          command << "-#{option}"
        else
          command << "--#{option.to_s.gsub("_", "-")}"
        end

        command << value.to_s unless value.nil?
      end

      command << url
      command
    end
def generate_command(url, *args, **options)
      command = %W[wget --no-verbose --save-headers -O -]

      options = @arguments.grep(Hash).inject({}, :merge).merge(options)
      args    = @arguments.grep(->(o){!o.is_a?(Hash)}) + args

      (args + options.to_a).each do |option, value|
        if option.is_a?(String)
          command << option
        elsif option.length == 1
          command << "-#{option}"
        else
          command << "--#{option.to_s.gsub("_", "-")}"
        end

        command << value.to_s unless value.nil?
      end

      command << url
      command
    end
Generates the wget command.