Skip to content

MRuby library that allows constants defined by const_set(Class.new) to return the constant name when inspected

Notifications You must be signed in to change notification settings

mrbgems/mruby-named-constants

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

MRuby library that allows constants defined by const_set(Class.new) to return the constant name when inspected

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 77.7%
  • C 22.3%