/usr/lib/ruby/vendor_ruby/ethon/easy/options.rb is in ruby-ethon 0.7.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | module Ethon
class Easy
# This module contains the logic and knowledge about the
# available options on easy.
module Options
attr_reader :url
def url=(value)
@url = value
Curl.set_option(:url, value, handle)
end
Curl.easy_options.each do |opt,props|
eval %Q<
def #{opt}=(value)
Curl.set_option(:#{opt}, value, handle)
value
end
> unless method_defined? opt.to_s+"="
if props[:type]==:callback then
eval %Q<
def #{opt}(&block)
@procs ||= {}
@procs[:#{opt}]=block
Curl.set_option(:#{opt}, block, handle)
nil
end
> unless method_defined? opt.to_s
end
end
end
end
end
|