class Representable::Decorator
Attributes
decorated[R]
represented[R]
Public Class Methods
clone()
click to toggle source
This is called from inheritable_attr when inheriting a decorator class to a subclass. Explicitly subclassing the Decorator
makes sure representable_attrs is a clean version.
# File lib/representable/decorator.rb, line 22 def self.clone Class.new(self) end
default_nested_class()
click to toggle source
# File lib/representable/decorator.rb, line 14 def self.default_nested_class #FIXME. SHOULD we move that into NestedBuilder? Representable::Decorator end
nested_builder()
click to toggle source
# File lib/representable/decorator.rb, line 37 def self.nested_builder ::Declarative::Schema::DSL::NestedBuilder end
new(represented)
click to toggle source
# File lib/representable/decorator.rb, line 33 def initialize(represented) @represented = represented end
prepare(represented)
click to toggle source
TODO: when moving all class methods into ClassMethods
, i get a segfault.
# File lib/representable/decorator.rb, line 10 def self.prepare(represented) new(represented) end