Sha256: ef2fa5f111fc140497164ce30217e2a7d999cfa62038444a5f8f6a20201e03b6
Contents?: true
Size: 345 Bytes
Versions: 32
Compression:
Stored size: 345 Bytes
Contents
# # of course fattrs works as well at class/module level as at instance # level # require 'fattr' module Logging Level_names = { 0 => 'INFO', # ... 42 => 'DEBUG', } class << Logging fattr 'level' => 42 fattr('level_name'){ Level_names[level] } end end p Logging.level p Logging.level_name
Version data entries
32 entries across 32 versions & 3 rubygems