class ButterCMS::DataStoreAdapters::Yaml
Public Class Methods
new(options)
click to toggle source
# File lib/buttercms/data_store_adapters/yaml.rb, line 6 def initialize(options) file_path = options.first @store = YAML::Store.new file_path end
Public Instance Methods
get(key)
click to toggle source
# File lib/buttercms/data_store_adapters/yaml.rb, line 18 def get(key) @store.transaction do @store[key] end end
set(key, value)
click to toggle source
# File lib/buttercms/data_store_adapters/yaml.rb, line 12 def set(key, value) @store.transaction do @store[key] = value end end