Module: Representable

Included in:
Decorator
Defined in:
lib/representable/config.rb,
lib/representable.rb,
lib/representable/xml.rb,
lib/representable/hash.rb,
lib/representable/json.rb,
lib/representable/yaml.rb,
lib/representable/apply.rb,
lib/representable/debug.rb,
lib/representable/cached.rb,
lib/representable/mapper.rb,
lib/representable/object.rb,
lib/representable/binding.rb,
lib/representable/version.rb,
lib/representable/autoload.rb,
lib/representable/coercion.rb,
lib/representable/pipeline.rb,
lib/representable/decorator.rb,
lib/representable/populator.rb,
lib/representable/definition.rb,
lib/representable/serializer.rb,
lib/representable/declarative.rb,
lib/representable/inheritable.rb,
lib/representable/xml/binding.rb,
lib/representable/deserializer.rb,
lib/representable/hash/binding.rb,
lib/representable/hash_methods.rb,
lib/representable/yaml/binding.rb,
lib/representable/for_collection.rb,
lib/representable/object/binding.rb,
lib/representable/parse_strategies.rb,
lib/representable/hash/allow_symbols.rb

Overview

Caching of Bindings in Decorators, this could be an instance class var. when inherited, it is automatically busted. however, in modules we can’t do that. we never know when a module is “finalised”, so we don’t really know when to bust the cache.

Defined Under Namespace

Modules: Apply, Cached, ClassInclusions, ClassMethods, Cloneable, Coercion, Debug, Declarative, Feature, ForCollection, Hash, HashMethods, Inheritable, JSON, ModuleExtensions, Object, Represent, XML, YAML Classes: Binding, Config, Decorator, Definition, DeserializeError, Deserializer, Mapper, ParseStrategy, Pipeline, Populator, Serializer

Constant Summary collapse

VERSION =
"2.2.2"

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#representable_attrs=(value) ⇒ Object

Sets the attribute representable_attrs

Parameters:

  • value

    the value to set the attribute representable_attrs to.



21
22
23
# File 'lib/representable.rb', line 21

def representable_attrs=(value)
  @representable_attrs = value
end

Class Method Details

.included(base) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/representable.rb', line 23

def self.included(base)
  base.class_eval do
    extend Declarative
    extend ClassInclusions, ModuleExtensions
    extend ClassMethods
    extend Feature
    extend ForCollection
    extend Represent
    extend Apply
    # register_feature Representable # Representable gets included automatically when creating inline representer.
  end
end