Sha256: ca65966c701202901a11bcd3573146e8caa32472b27c0897d5926ad4fceebf5a

Contents?: true

Size: 411 Bytes

Versions: 1

Compression:

Stored size: 411 Bytes

Contents

class Asetus
  def to_toml(config)
    Adapter::TOML.to config._asetus_to_hash
  end

  def from_toml(toml)
    Adapter::TOML.from toml
  end

  class Adapter
    class TOML
      class << self
        def to(hash)
          require 'toml'
          ::TOML::Generator.new(hash).body
        end

        def from(toml)
          require 'toml'
          ::TOML.load toml
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asetus-0.4.0 lib/asetus/adapter/toml.rb