Class: HALDecorator::Embedded::Embed

Inherits:
Property
  • Object
show all
Defined in:
lib/hal_decorator/embedded.rb

Instance Attribute Summary collapse

Attributes inherited from Property

#name, #options, #resource

Instance Method Summary collapse

Methods inherited from Property

#change_scope, #method_missing, #respond_to_missing?, #value

Constructor Details

#initialize(name, value = nil, decorator_class: nil, &block) ⇒ Embed

Returns a new instance of Embed.



8
9
10
11
# File 'lib/hal_decorator/embedded.rb', line 8

def initialize(name, value = nil, decorator_class: nil, &block)
  super(name, value, &block)
  @decorator_class = decorator_class
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class HALDecorator::Property

Instance Attribute Details

#decorator_classObject (readonly)

Returns the value of attribute decorator_class.



6
7
8
# File 'lib/hal_decorator/embedded.rb', line 6

def decorator_class
  @decorator_class
end