Module: Hiccup::Humanizable
- Includes:
- Convenience
- Defined in:
- lib/hiccup/humanizable.rb
Instance Method Summary collapse
Methods included from Convenience
#annually?, #ends?, #monthly?, #never?, #weekly?
Instance Method Details
#humanize(format: "%Y-%m-%d") ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/hiccup/humanizable.rb', line 11 def humanize(format: "%Y-%m-%d") case kind when :never; start_date.strftime(format) when :weekly; weekly_humanize when :monthly; monthly_humanize when :annually; yearly_humanize else; "Invalid" end end |