Class: HasSetting::Formatters::StringFormatter

Inherits:
NilSafeFormatter show all
Defined in:
lib/has_setting/formatters.rb

Overview

Formatter for Strings

Instance Method Summary collapse

Methods inherited from NilSafeFormatter

#to_s, #to_type

Instance Method Details

#safe_to_s(value) ⇒ Object



42
43
44
# File 'lib/has_setting/formatters.rb', line 42

def safe_to_s(value)
  value.to_s
end

#safe_to_type(value) ⇒ Object



39
40
41
# File 'lib/has_setting/formatters.rb', line 39

def safe_to_type(value)
  value
end