Larimar is a property file reader
Add this to your application's shard.yml
:
dependencies:
larimar:
github: Wozzy06/larimar
require "larimar"
# create property file
properties = Larimar::Properties.new
# load properties from a file
properties.load("path/to/your/property-file")
# parse one line (String) and register its content in memory
# does nothing on invalid entry
properties.parse("your.property=value")
# get number of properties loaded
size = properties.size
# assert existence of a key
if properties.exists?("your.property")
# get a loaded property
# raise an exception if the key is invalid
properties.get("your.property")
end
# get a loaded property
# return default value if requested does not exist
properties.get("your.fake.property", "your default value")
# delete a key
properties.delete("your.property")
# delete all properties
properties.flush
- Fork it ( https://github.com/Wozzy06/larimar/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- Wozzy06 Mead - creator, maintainer