Sha256: d947975da38a2bd2be889eb76fe8da7ba060404253905be990bd4c167ff37990
Contents?: true
Size: 468 Bytes
Versions: 6
Compression:
Stored size: 468 Bytes
Contents
# frozen_string_literal: true require "forwardable" module Pennyworth module Presenters # Shapes a text record for serialization. class Text extend Forwardable delegate %i[id content] => :record def initialize record, inflector: Inflector.new @record = record @inflector = inflector end def label = inflector.call(record.content.to_s) private attr_reader :record, :inflector end end end
Version data entries
6 entries across 6 versions & 1 rubygems