Guest User

Untitled

a guest
Mar 11th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. Distinct advantages:
  2. -clear distinction between key and value
  3. -primary literals for:
  4. numbers,
  5. dates (with zone),
  6. durations,
  7. strings (with encoding),
  8. arrays,
  9. ordered hashes
  10. -possibility to create arbitrary literals
  11. -simple references to other keys
  12. -configuration description file - to enable automated checking and interfacing
  13.  
  14.  
  15. example description file:
  16. ----------------------------------------------------------------------------------------------------
  17. username:
  18. type: String(UTF8)
  19. valid:
  20. between: 1, 50
  21. matches: /foo/
  22. invalid:
  23. matches: /bar/
  24. connections/*/server:
  25. type: String(ASCII)
  26. connections/*/port:
  27. type: Integer
  28. valid:
  29. between: 0, 65535
  30. ----------------------------------------------------------------------------------------------------
  31.  
  32. another example description file, notice that you can have multiple, they are just merged:
  33. ----------------------------------------------------------------------------------------------------
  34. username:
  35. description:
  36. en: "A description in english of what this field is"
  37. connections/*/server:
  38. description:
  39. en: "A description in english of what this field is"
  40. connections/*/port:
  41. description:
  42. en: "A description in english of what this field is"
  43. ----------------------------------------------------------------------------------------------------
  44.  
  45.  
  46.  
  47. example config file:
  48. ----------------------------------------------------------------------------------------------------
  49. username: "foobar"
  50. connections \
  51. main \
  52. server: "irc.freenode.org"
  53. port: 5000
  54. nickname: $username
  55.  
  56. channels \
  57. #butler \
  58. password: none
  59. ----------------------------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment