0exp / qonfig

Powerful configuration Ruby-framework with a support for many commonly used config formats with a multi-functional API, developer-friendly DSL and object-oriented behavior.
MIT License
23 stars 8 forks source link

[instance] Setting key aliases #119

Open 0exp opened 4 years ago

0exp commented 4 years ago

SUBJ

PoC:

class Config < Qonfig::DataSet
  setting :a, 22, as: :b # as: [:b, 'c', :d]
end

config = Config.new

config.a # => 22
config.b # => 22
config.c # => 22
config.d # => 22

config[:a] = 45
cofig.b # => 45
# and etc