Sha256: a57727ec448c7a8dda9c85db11002caa7f23c65567d014891522c92b44ed0ced

Contents?: true

Size: 393 Bytes

Versions: 11

Compression:

Stored size: 393 Bytes

Contents

class Asetus

  def to_yaml config
    Adapter::YAML.to config._asetus_to_hash
  end

  def from_yaml yaml
    Adapter::YAML.from yaml
  end

  class Adapter
    class YAML
      class << self
        def to hash
          require 'yaml'
          ::YAML.dump hash
        end

        def from yaml
          require 'yaml'
          ::YAML.load yaml
        end
      end
    end
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
asetus-0.3.0 lib/asetus/adapter/yaml.rb
asetus-0.2.0 lib/asetus/adapter/yaml.rb
asetus-0.1.2 lib/asetus/adapter/yaml.rb
asetus-0.1.1 lib/asetus/adapter/yaml.rb
asetus-0.1.0 lib/asetus/adapter/yaml.rb
asetus-0.0.7 lib/asetus/adapter/yaml.rb
asetus-0.0.6 lib/asetus/adapter/yaml.rb
asetus-0.0.5 lib/asetus/adapter/yaml.rb
asetus-0.0.4 lib/asetus/adapter/yaml.rb
asetus-0.0.3 lib/asetus/adapter/yaml.rb
asetus-0.0.1 lib/asetus/adapter/yaml.rb