Sha256: 6418f77a53cc418ae78f459077565496e8d0730e23d0c5d3188f069158ccf134
Contents?: true
Size: 371 Bytes
Versions: 4
Compression:
Stored size: 371 Bytes
Contents
# frozen_string_literal: true module Chic module Formatters class Nil < Formatter BLANK_VALUE = '(No Value)' def blank_value(value) @blank_value = value self end def to_s value.blank? ? (@blank_value || BLANK_VALUE) : value end private def value object.to_s end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
chic-0.4.0 | lib/chic/formatters/nil.rb |
chic-0.3.1 | lib/chic/formatters/nil.rb |
chic-0.3.0 | lib/chic/formatters/nil.rb |
chic-0.2.0 | lib/chic/formatters/nil.rb |