Method: Lookbook::Param#value
- Defined in:
- lib/lookbook/param.rb
#value ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/lookbook/param.rb', line 27 def value val = @value || value_default if value_type == "datetime" formatter = (input == "datetime-local") ? "%Y-%m-%dT%T" : "%Y-%m-%d" StringValueCaster.call(val, "datetime")&.strftime(formatter) else val end end |