Sha256: 7944f74730fa02102c94ea74ba9c9418fc4acab83ec3417041996aa649a249b5
Contents?: true
Size: 391 Bytes
Versions: 6
Compression:
Stored size: 391 Bytes
Contents
module AngularSprinkles class ModelDecorator < SimpleDelegator def initialize(args) @key = args.fetch(:key) @json_wrapper = args.fetch(:json_wrapper) @object_wrapper = args.fetch(:object_wrapper) object = args.fetch(:object) super(object) end def bind(attribute = nil) @object_wrapper.new(@key, attribute, @json_wrapper) end end end
Version data entries
6 entries across 6 versions & 1 rubygems