Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Distinct advantages:
- -clear distinction between key and value
- -primary literals for:
- numbers,
- dates (with zone),
- durations,
- strings (with encoding),
- arrays,
- ordered hashes
- -possibility to create arbitrary literals
- -simple references to other keys
- -configuration description file - to enable automated checking and interfacing
- example description file:
- ----------------------------------------------------------------------------------------------------
- username:
- type: String(UTF8)
- valid:
- between: 1, 50
- matches: /foo/
- invalid:
- matches: /bar/
- connections/*/server:
- type: String(ASCII)
- connections/*/port:
- type: Integer
- valid:
- between: 0, 65535
- ----------------------------------------------------------------------------------------------------
- another example description file, notice that you can have multiple, they are just merged:
- ----------------------------------------------------------------------------------------------------
- username:
- description:
- en: "A description in english of what this field is"
- connections/*/server:
- description:
- en: "A description in english of what this field is"
- connections/*/port:
- description:
- en: "A description in english of what this field is"
- ----------------------------------------------------------------------------------------------------
- example config file:
- ----------------------------------------------------------------------------------------------------
- username: "foobar"
- connections \
- main \
- server: "irc.freenode.org"
- port: 5000
- nickname: $username
- channels \
- #butler \
- password: none
- ----------------------------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment