Module: Representable

Included in:
Decorator
Defined in:
lib/representable/config.rb,
lib/representable.rb,
lib/representable/xml.rb,
lib/representable/yaml.rb,
lib/representable/json.rb,
lib/representable/hash.rb,
lib/representable/debug.rb,
lib/representable/apply.rb,
lib/representable/mapper.rb,
lib/representable/version.rb,
lib/representable/binding.rb,
lib/representable/pipeline.rb,
lib/representable/autoload.rb,
lib/representable/coercion.rb,
lib/representable/populator.rb,
lib/representable/decorator.rb,
lib/representable/definition.rb,
lib/representable/serializer.rb,
lib/representable/declarative.rb,
lib/representable/xml/binding.rb,
lib/representable/inheritable.rb,
lib/representable/yaml/binding.rb,
lib/representable/hash/binding.rb,
lib/representable/deserializer.rb,
lib/representable/hash_methods.rb,
lib/representable/for_collection.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, ClassInclusions, ClassMethods, Cloneable, Coercion, Debug, Declarative, Feature, ForCollection, Hash, HashMethods, Inheritable, JSON, ModuleExtensions, Represent, XML, YAML Classes: Binding, Config, Decorator, Definition, DeserializeError, Deserializer, Mapper, ParseStrategy, Pipeline, Populator, Serializer

Constant Summary

VERSION =
"2.1.3"

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.



17
18
19
# File 'lib/representable.rb', line 17

def representable_attrs=(value)
  @representable_attrs = value
end

Class Method Details

.included(base) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/representable.rb', line 19

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