class Estratto::Data::String

Public Instance Methods

coerce() click to toggle source
# File lib/estratto/data/string.rb, line 7
def coerce
  if strip_value?
    stripped_data
  else
    data
  end
end

Private Instance Methods

strip_value?() click to toggle source
# File lib/estratto/data/string.rb, line 17
def strip_value?
  formats.dig('strip') || false
end
stripped_data() click to toggle source
# File lib/estratto/data/string.rb, line 21
def stripped_data
  data.strip
end