# << 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 ); # /wavemon.git/tree/config/install-sh?h=debian/0.8.2-1&id=4eea36b1eb11f8b1a5629ee7a44c4e0b61ee643e'>treecommitdiffstats
path: root/config/install-sh (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2014-03-23Release 0.7.6-2debian/0.7.6-2Jonathan McCrohan1-2/+2
2014-03-23d/{control,rules}: Switch from dh-autoreconf to autotools-devJonathan McCrohan3-2/+4
2014-03-23Manually install docs using dh (Closes: #736932)Jonathan McCrohan5-19/+44
2014-01-28Release 0.7.6-1debian/0.7.6-1Jonathan McCrohan1-2/+2
2014-01-27d/rules: Use DEB_CFLAGS_MAINT_APPEND to ensure -pthread is always passed to C...Jonathan McCrohan2-0/+4
2014-01-27d/control: Build-Depends on dh-autoreconf rather than autotools-devJonathan McCrohan3-2/+3
2014-01-25d/patches: Drop 01-Allow-buildflags-to-be-overridden.patch; applied upstream,...Jonathan McCrohan4-51/+7
2014-01-25New upstream releaseJonathan McCrohan1-1/+5
2014-01-25Imported Upstream version 0.7.6upstream/0.7.6Jonathan McCrohan23-671/+743
2014-01-24d/control: bump Standards-Version to 3.9.5Jonathan McCrohan2-1/+3
2014-01-24d/control: update homepage URLJonathan McCrohan2-1/+2
2012-12-18Remove DMUA flag from d/controlJonathan McCrohan2-1/+7
2012-06-29Release 0.7.5-3debian/0.7.5-3Jonathan McCrohan1-2/+2
2012-06-29Set DM-Upload-Allowed flagNicholas Breen2-0/+5
2012-06-25Backport upstream commit eeaf804Jonathan McCrohan4-43/+56
2012-06-10Release 0.7.5-2debian/0.7.5-2Jonathan McCrohan1-2/+2
2012-06-10Added 01-pass-cppflags-and-ldflags-to-compiler.patch to enable build hardeningJonathan McCrohan4-3/+48
2012-06-10Bump debhelper to v9Jonathan McCrohan3-3/+4
2012-06-09Mark as linux-any to save CPU cycles on KFreeBSD/Hurd builddsJonathan McCrohan2-1/+7
2012-05-06Release 0.7.5-1debian/0.7.5-1Jonathan McCrohan1-0/+7
2012-05-06Imported Upstream version 0.7.5upstream/0.7.5Jonathan McCrohan12-44/+218
2012-03-06Release 0.7.4-1debian/0.7.4-1Jonathan McCrohan4-157/+10
2012-03-05Imported Upstream version 0.7.4upstream/0.7.4Jonathan McCrohan13-134/+244
2012-02-26Update 02-fix-wavemonrc.5-man-errors.patchdebian/0.7.3-1Jonathan McCrohan1-14/+23
2012-02-26Switch to dh-style rules.Jonathan McCrohan3-10/+4
2012-02-21Refresh patchesJonathan McCrohan3-1/+149
2012-02-21Refresh changelogJonathan McCrohan1-4/+5
2012-02-21Add details to patch.Jonathan McCrohan1-0/+5
2012-02-06Promote myself to maintainer.Jonathan McCrohan3-9/+8
2012-02-05Change to dpkg-source 3.0Jonathan McCrohan1-2/+2
2012-02-05Update broken handcrafted patchJonathan McCrohan1-2/+2
2012-02-05Use 3.0 (quilt)Jonathan McCrohan2-2/+2
2012-02-05Use 3.0 (quilt)Jonathan McCrohan3-0/+13
2012-02-05Use quiltJonathan McCrohan3-6/+9
2012-02-05Update changelogJonathan McCrohan1-1/+6
2012-02-05clean up packagingJonathan McCrohan2-2/+1
2012-02-05fix errorsJonathan McCrohan3-10/+3
2012-02-05Undo accidental source changesJonathan McCrohan2-9/+9
2012-02-05Add patch to remove copyingJonathan McCrohan2-1/+9