settingslogic icon indicating copy to clipboard operation
settingslogic copied to clipboard

Nested namespaces

Open mistersourcerer opened this issue 10 years ago • 1 comments

This PR adds the ability to create a settings class with a nested namespace, so the "base hash" can be fetched from inside some yaml key.

  # /some/file/here.yml
  professional:
    preferences:
      order: desc
  client:
    prefs:
      order: asc

  class ProfessionalPreferences < Settingslogic
    source "/some/file/here.yml"
    namespace "professional.preferences"
  end
  >> ProfessionalPreferences.order
  => "desc"

mistersourcerer avatar Apr 16 '14 21:04 mistersourcerer

+1

zhouguangming avatar Dec 09 '15 14:12 zhouguangming