Module: HALDecorator::Embedded

Included in:
HALDecorator
Defined in:
lib/hal_decorator/embedded.rb

Defined Under Namespace

Classes: Embed

Instance Method Summary collapse

Instance Method Details

#embed(*args, &block) ⇒ Object



14
15
16
17
18
# File 'lib/hal_decorator/embedded.rb', line 14

def embed(*args, &block)
  @_embedded ||= init_embedded
  @_embedded = @_embedded.reject { |embed| embed.name == args.first }
  @_embedded << Embed.new(*args, &block)
end