Sha256: e21bdc43d133d082af2cf4f442fb8710461ff82b270aa18870dfc81e3d3cc2f0
Contents?: true
Size: 535 Bytes
Versions: 3
Compression:
Stored size: 535 Bytes
Contents
module Virtus class Attribute def localized? options[:localized] end def define_accessor_methods(attribute_set) if self.localized? attribute_set.define_localized_reader_method(self, name, options[:reader]) attribute_set.define_localized_writer_method(self, "#{name}=", options[:writer]) else attribute_set.define_reader_method(self, name, options[:reader]) attribute_set.define_writer_method(self, "#{name}=", options[:writer]) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
virtus-localized-1.0.0 | lib/virtus/localized/attribute.rb |
virtus-localized-0.1.1 | lib/virtus/localized/attribute.rb |
virtus-localized-0.1.0 | lib/virtus/localized/attribute.rb |