Sha256: 4b863390e8de57427751c15e2161156e76900dd70f39f3190ca52241d4cee3f8
Contents?: true
Size: 539 Bytes
Versions: 12
Compression:
Stored size: 539 Bytes
Contents
module Apidae module OverriddenFields # Note : add non-localized fields that can be overridden in aspects (openings, rates etc...) LOCALIZED_FIELDS.each do |f| define_method f do if @obj_version == DEFAULT_VERSION val = (super() || {})[@locale] val ||= (super() || {})[DEFAULT_LOCALE] if root_obj_id.nil? val else v = in_version(@obj_version) v ? (v.in_locale(@locale).send(f) || super()[@locale]) : super()[@locale] end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems