Sha256: 6b5f668012f0b85aedd504f0dd22d97d7d2869704b12d603df36180391691f11
Contents?: true
Size: 359 Bytes
Versions: 5
Compression:
Stored size: 359 Bytes
Contents
# # of course attributes works as well at class/module level as at instance # level # require 'attributes' module Logging Level_names = { 0 => 'INFO', # ... 42 => 'DEBUG', } class << self attribute 'level' => 42 attribute('level_name'){ Level_names[level] } end end p Logging.level p Logging.level_name
Version data entries
5 entries across 5 versions & 2 rubygems
Version | Path |
---|---|
attributes1-5.0.3 | samples/f.rb |
attributes1-5.0.2 | samples/f.rb |
attributes-5.0.1 | samples/f.rb |
attributes-5.0.0 | samples/f.rb |
attributes-4.1.0 | samples/f.rb |