Sha256: 9864b0954078c20e845ee720f8b06b24874eb3c61f4b77ab1b733cb13d1afc66
Contents?: true
Size: 521 Bytes
Versions: 58
Compression:
Stored size: 521 Bytes
Contents
module Para module Component module Subclassable extend ActiveSupport::Concern included do configurable_on :subclasses end def subclassable? @subclassable ||= subclass_names.length > 0 end def subclassable_with?(class_name) subclassable? && class_name.in?(subclass_names) end def subclass_names @subclass_names ||= if subclasses.present? eval(subclasses) else [] end end end end end
Version data entries
58 entries across 58 versions & 1 rubygems