# << Usage >> # you can feed this README to irb and see the result # $ irb README # IMPORTANT NOTICE: # be careful with big *fixnum* (plain int) values in configs # int is 32 bit, but ruby fixnum is only 31! # For example, 2100000000 will be read as -47483648. require 'rconfig' c = Config.new c.read!('test.cfg') # => IOError c.read('test.cfg') # => false p c['some_var'] # => SettingNotFoundError # note: Config#lookup is alias for Config#[] c.append 'fixnum', Config::Fixnum.new(150) # # f1 = Config::Fixnum.new(1) c.append 'another_fixnum', f1 f2 = Config::Fixnum.new(256) c.append 'next_fixnum', f2 p c.size # => 3 c.delete(f1) # by element c.delete(0) # by index c.delete('next_fixnum') # by name # note: (at now) you cannot delete nested elements by Config#delete # you can do c['nested.element'].parent.delete(c['nested.element']) p c.size # => 0 l = Config::List.new c.append 'the_list', l l.append Config::String.new("abcdef") l << Config::Float.new(3.14) # note: Config::List#append and Config::Array#append both have # aliases Config::[Aggregate]#<< p l.name # => "the_list" p l.index # => 0 p l.root? # => false p l.size # => 3 l[0].format = Config::FORMAT_HEX p l[1].value # => 3.14 l[1].value = 2.71828 c.write 'test.cfg' # you will get test.cfg with following contents: # # the_list = ( "abcdef", 2.71828, 0x2A ); # t/tw-All?h=upstream/0%2bgit20170425.fb5fe05&showmsg=1&follow=1'>logtreecommitdiffstats
path: root/channels-conf/dvb-t/tw-All (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2017-01-05New upstream version 0+git20161227.ac7535aupstream/0+git20161227.ac7535aJonathan McCrohan39-1522/+4879
2016-06-11Imported Upstream version 0+git20160503.4f192bdupstream/0+git20160503.4f192bdJonathan McCrohan1307-2667/+38002
2016-01-18Imported Upstream version 0+git20151202.3864e0aupstream/0+git20151202.3864e0aJonathan McCrohan840-4057/+18230
2015-04-01Imported Upstream version 0+git20150208.f2053b3upstream/0+git20150208.f2053b3Jonathan McCrohan32-333/+483
2014-12-28Imported Upstream version 0+git20141218.b46a22cupstream/0+git20141218.b46a22cJonathan McCrohan535-639/+317
2014-10-15Imported Upstream version 0+git20141009.d26b627upstream/0+git20141009.d26b627Jonathan McCrohan2010-11120/+159271
2014-07-23Imported Upstream version 0+git20140611.14bd6c7upstream/0+git20140611.14bd6c7Jonathan McCrohan7-11/+60
2014-05-13Imported Upstream version 0+git20140512.1246b27upstream/0+git20140512.1246b27Jonathan McCrohan391-301/+3983
2014-04-05Imported Upstream version 0+git20140326.cfc2975upstream/0+git20140326.cfc2975Jonathan McCrohan118-656/+877