Class: StoreConfigurable::Object

Inherits:
ActiveSupport::ProxyObject
  • Object
show all
Extended by:
Coding
Includes:
Behavior
Defined in:
lib/store_configurable/object.rb

Overview

The is the object returned by the config method. It does nothing more than delegate all calls to a tree of DirtyTrackingOrderedOptions objects which are basically hashes.

Defined Under Namespace

Modules: Behavior, Coding

Constant Summary collapse

OMAP_CONVERTER =
lambda do |config|
  ::ActiveSupport::OrderedHash[config.to_a].tap do |omap|
    omap.each { |k,v| omap[k] = OMAP_CONVERTER.call(v) if v.is_a?(::Hash) }
  end
end
YAML_LOADER =
lambda do |options, key, value|
  value.is_a?(::Hash) ? value.each { |k,v| YAML_LOADER.call(options.send(:[],key), k, v) } :
    options.send(:[]=, key, value)
end

Instance Attribute Summary

Attributes included from Behavior

#__store_configurable_owner__

Method Summary

Methods included from Coding

dump, load

Methods included from Behavior

#__config__

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class StoreConfigurable::Object::Behavior