Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 350 Bytes

README.md

File metadata and controls

15 lines (11 loc) · 350 Bytes

mruby-named-constants

MRuby library that allows constants of Module | Class set via const_set to return name when inspect or to_s is called on them

  ::Object.const_set :A, Class.new

  ::A.const_set :B, Class.new()
  ::A.const_set :C, Module.new()
  
  p ::A  # => A
  p A::B # => A::B
  p A::C # => A::C