Sha256: bafd32a7a277850d7324e28ead2c48db0d094e65e59e4dd1c8130ac3aa33d520
Contents?: true
Size: 522 Bytes
Versions: 7
Compression:
Stored size: 522 Bytes
Contents
module HyperI18n class Localize < Hyperstack::ServerOp include HelperMethods param :acting_user, nils: true param :date_or_time param :format param :opts param :localization, default: nil def date_or_time @date_or_time ||= formatted_date_or_time(params.date_or_time) end def opts @opts ||= params.opts.with_indifferent_access.merge(format: formatted_format(params.format)) end step do params.localization = ::I18n.l(date_or_time, opts) end end end
Version data entries
7 entries across 7 versions & 1 rubygems