Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sub-config] An ability to export a set of sub-settings as Qonfig::DataSet instance #104

Open
0exp opened this issue Feb 13, 2020 · 0 comments · May be fixed by #106
Open

[sub-config] An ability to export a set of sub-settings as Qonfig::DataSet instance #104

0exp opened this issue Feb 13, 2020 · 0 comments · May be fixed by #106
Assignees
Labels
Milestone

Comments

@0exp
Copy link
Owner

0exp commented Feb 13, 2020

For example:

class Config < Qonfig::DataSet
  setting :database do
    setting :host
    setting :port
  end
end

config = Config.new
sub_config = config.sub_settings(:database) # => <Qonfig::DataSet:0x00007ff8>

sub_config.to_h
# =>
{ host: nil, port: nil }
@0exp 0exp added the feature label Feb 13, 2020
@0exp 0exp added this to the 0.25.0 milestone Feb 13, 2020
@0exp 0exp self-assigned this Feb 13, 2020
@0exp 0exp modified the milestones: 0.25.0, 0.26.0 Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant