Class: Interfacets::Shared::Entities::Specs::Merger
- Inherits:
-
Object
- Object
- Interfacets::Shared::Entities::Specs::Merger
- Defined in:
- lib/interfacets/shared/entities/specs.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #call(entity, value) ⇒ Object
-
#initialize(name:, block:) ⇒ Merger
constructor
A new instance of Merger.
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 |