Sha256: 2f1b973554e0e40c1e46ee032d91bb2d95f8ce696f7eead85072befad94e31da
Contents?: true
Size: 838 Bytes
Versions: 5
Compression:
Stored size: 838 Bytes
Contents
# frozen_string_literal: true module Thinreports module BasicReport module Core module Shape module TextBlock module Formatter class Basic include Utils attr_reader :format def initialize(format) @format = format end def apply(value) value = apply_format_to(value) if applicable?(value) return value if blank_value?(format.format_base) format.format_base.gsub(/\{value\}/, value.to_s) end private def apply_format_to(value) value end def applicable?(_value) true end end end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems