Sha256: a0a4519699cfa5d2016246958dcb8f09a23c1e6ab3103f12f4d3a3a6a3bb7b6b
Contents?: true
Size: 482 Bytes
Versions: 6
Compression:
Stored size: 482 Bytes
Contents
module Rules module Parameters require 'rules/parameters/parameter' require 'rules/parameters/attribute' require 'rules/parameters/constant' @@constants ||= {} def self.constants @@constants end def self.define_constant(key, &block) raise "Constant #{key} already exists" if @@constants[key] constant = Constant.new(key: key) constant.instance_eval(&block) if block_given? @@constants[key] = constant end end end
Version data entries
6 entries across 6 versions & 1 rubygems