Class: Interfacets::Shared::Entities::Specs::Merger

Inherits:
Object
  • Object
show all
Defined in:
lib/interfacets/shared/entities/specs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, block:) ⇒ Merger

Returns a new instance of Merger.



149
150
151
152
# File 'lib/interfacets/shared/entities/specs.rb', line 149

def initialize(name:, block:)
  @name = name
  @block = block
end

Instance Attribute Details

#block ⇒ Object (readonly)

Returns the value of attribute block.



148
149
150
# File 'lib/interfacets/shared/entities/specs.rb', line 148

def block
  @block
end

#name ⇒ Object (readonly)

Returns the value of attribute name.



148
149
150
# File 'lib/interfacets/shared/entities/specs.rb', line 148

def name
  @name
end

Instance Method Details

#call(entity, value) ⇒ Object



154
155
156
# File 'lib/interfacets/shared/entities/specs.rb', line 154

def call(entity, value)
  block.call(entity, value)
end