Sha256: f9d2563ea6ea40d23a21609a118d05baec08a2e4e264c396d49fb622d6ae085e
Contents?: true
Size: 599 Bytes
Versions: 18
Compression:
Stored size: 599 Bytes
Contents
# -*- encoding : utf-8 -*- require 'phrase/delegate' class Phrase::Delegate::FastGettext < Phrase::Delegate::Base def initialize(method, *args) @method = method params = params_from_args(args) @display_key = params[:msgid] end private def params_from_args(args) params = case @method when :_ {msgid: args.first} when :n_ {msgid: args.first, msgid_plural: args[1], count: args.last} when :s_ {msgid: args.first} else self.class.log("Unsupported FastGettext method #{@method}") {} end params end end
Version data entries
18 entries across 18 versions & 1 rubygems