Sha256: 9046f6c74dd1205b0886b6fedff2aa5c82605bb3b9378ab7c8cde462f07001cf
Contents?: true
Size: 494 Bytes
Versions: 3
Compression:
Stored size: 494 Bytes
Contents
require 'active_support' require 'json_attributes/version' require 'json_attributes/legacy_predicates' require 'json_attributes/legacy_attributes' module JsonAttributes extend ActiveSupport::Concern included do include LegacyPredicates prepend LegacyAttributes end class_methods do def json_attributes(field, *json_attrs) @json_attrs = json_attrs @field = field define_question_methods store_accessor field, *json_attrs end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
json_attributes-0.1.2 | lib/json_attributes.rb |
json_attributes-0.1.1 | lib/json_attributes.rb |
json_attributes-0.1.0 | lib/json_attributes.rb |