Class: Hanami::View::PartBuilder
- Defined in:
- lib/hanami/view/part_builder.rb
Overview
Decorates exposure values with matching parts.
Class Method Summary collapse
-
.call(name, value, as: nil, rendering:) ⇒ Hanami::View::Part
Decorates an exposure value.
Class Method Details
.call(name, value, as: nil, rendering:) ⇒ Hanami::View::Part
Decorates an exposure value.
21 22 23 24 25 |
# File 'lib/hanami/view/part_builder.rb', line 21 def call(name, value, as: nil, rendering:) builder = value.respond_to?(:to_ary) ? :build_collection_part : :build_part send(builder, name: name, value: value, as: as, rendering: rendering) end |