Sha256: b3f228a6aed48ab23bad4fbac9e0e522040073d672b48cb68f1013f359678328
Contents?: true
Size: 674 Bytes
Versions: 4
Compression:
Stored size: 674 Bytes
Contents
require 'meta_tools' #++ # Should this be class Object? # Is there really a difference? #-- class Module # This declares that the current class has a rulebook # with rules that it wants it's instances to follow. # # I picked this name because the probability of someone needing the method # 'follows_the_rules!' (with a bang) is slim... hopefully. # # This adds the following method: # User#rulebook # Returns the RuleBook instance that contains the defined rules. def follows_the_rules! extend(MetaTools) include(MetaTools) extend(Rulebook::ClassMethods) include(Rulebook::InstanceMethods) end end
Version data entries
4 entries across 4 versions & 1 rubygems