Sha256: 04d076ea9fc59d5b3dbd80e1054ac23d06e8d0212997337dceae05a61c11c314
Contents?: true
Size: 603 Bytes
Versions: 10
Compression:
Stored size: 603 Bytes
Contents
# Ruby interface to Tidylib options. # class Tidyopt # Construct a new instance. # def initialize(doc) @doc = doc end # Reader for options (Hash syntax). # def [](name) Tidylib.opt_get_value(@doc, name) end # Writer for options (Hash syntax). # def []=(name, value) Tidylib.opt_parse_value(@doc, name, value) end # Reader/Writer for options (Object syntax). # def method_missing(name, value=:none, *args) name = name.to_s.gsub('=', '') return self[name] if value == :none self[name] = value end end
Version data entries
10 entries across 10 versions & 6 rubygems