Sha256: 5a5c457d1341f6bdb5208866c7d1041faf501979c3a4bad3823a5cc383ca50ee
Contents?: true
Size: 659 Bytes
Versions: 16
Compression:
Stored size: 659 Bytes
Contents
require 'active_support/core_ext/class' module ActiveTriples module Reflection extend ActiveSupport::Concern included do class_attribute :_active_triples_config self._active_triples_config = {} end def self.add_reflection(model, name, reflection) model._active_triples_config = model._active_triples_config.merge(name.to_s => reflection) end module ClassMethods def reflect_on_property(term) _active_triples_config[term.to_s] end def properties _active_triples_config end def properties=(val) self._active_triples_config = val end end end end
Version data entries
16 entries across 16 versions & 1 rubygems