lib/qonfig/dsl.rb in qonfig-0.18.1 vs lib/qonfig/dsl.rb in qonfig-0.19.0
- old
+ new
@@ -7,21 +7,20 @@
# @param child_klass [Qonfig::DataSet]
# @return [void]
#
# @api private
# @since 0.1.0
+ # @version 0.19.0
def extended(child_klass)
child_klass.instance_variable_set(:@definition_commands, Qonfig::CommandSet.new)
child_klass.instance_variable_set(:@instance_commands, Qonfig::CommandSet.new)
child_klass.singleton_class.prepend(Module.new do
def inherited(child_klass)
child_klass.instance_variable_set(:@definition_commands, Qonfig::CommandSet.new)
child_klass.instance_variable_set(:@instance_commands, Qonfig::CommandSet.new)
-
- child_klass.definition_commands.concat(definition_commands)
- child_klass.instance_commands.concat(instance_commands)
+ Qonfig::DataSet::ClassBuilder.inherit(base_klass: self, child_klass: child_klass)
super
end
end)
end
end
@@ -180,7 +179,15 @@
caller_location = caller(1, 1).first
instance_commands << Qonfig::Commands::Instantiation::ValuesFile.new(
file_path, caller_location, format: format, strict: strict, expose: expose
)
+ end
+
+ # @return [void]
+ #
+ # @api public
+ # @since 0.19.0
+ def freeze_state!
+ instance_commands << Qonfig::Commands::Instantiation::FreezeState.new
end
end