Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

jamesarosen/multi_toml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multi_toml

multi_toml is an interface gem for https://github.com/mojombo/toml.

There are many great TOML libraries out there. If you're writing an application, you should be able to use any one you want. If you're writing a library that other libraries or applications will use, you should use multi_toml so that you don't impose a particular implementation on the consuming application.

Implementations

Seriously?

Not entirely seriously, no.

But Why?

Because application developers shouldn't have to install 3 TOML libraries.

Usage

Add one of the supported gems to your Gemfile (or you global gem path), then

require 'multi_toml'
MultiToml.load('a toml string')

MultiToml will try to guess the best adapter for you. If you need to specify an adapter:

require 'multi_toml'
MultiToml.adapter = :toml
MultiToml.load('a toml string') # parsed with the toml gem

About

A gem to provide swappable TOML backends.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages