Sha256: 524b4cf610907f02538909943f0175b69a006ef46a7b514cdedbb7ef95d9456a
Contents?: true
Size: 746 Bytes
Versions: 15
Compression:
Stored size: 746 Bytes
Contents
require 'active_support/concern' module Ardm class Property module Flags extend ActiveSupport::Concern included do accept_options :flags attr_reader :flag_map class << self attr_accessor :generated_classes end self.generated_classes = {} end def custom? true end module ClassMethods # TODO: document # @api public def [](*values) if klass = generated_classes[values.flatten] klass else klass = ::Class.new(self) klass.flags(values) generated_classes[values.flatten] = klass klass end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems