diff --git a/README.md b/README.md index b7d2530a..d3be75fc 100644 --- a/README.md +++ b/README.md @@ -526,6 +526,7 @@ config.settings['RUN_CI'] # => '1' - `.configuration` - settings definitions; - `.configure` - configuration; - `.config` - config object; + - settings definitions can be inherited; - instance-level: - `#configure` - configuration; - `#config` - config object; diff --git a/lib/qonfig/commands/compose.rb b/lib/qonfig/commands/compose.rb index 0716938a..13636cd5 100644 --- a/lib/qonfig/commands/compose.rb +++ b/lib/qonfig/commands/compose.rb @@ -13,6 +13,8 @@ class Compose < Base # @param data_set_klass [Qonfig::DataSet] # + # @raise [Qonfig::ArgumentError] + # # @api private # @since 0.1.0 def initialize(data_set_klass) diff --git a/spec/features/composition_spec.rb b/spec/features/composition_spec.rb index 3f0ca454..ed4555d1 100644 --- a/spec/features/composition_spec.rb +++ b/spec/features/composition_spec.rb @@ -173,21 +173,21 @@ class ProjectConfig < Qonfig::DataSet AppropriateConfig = Class.new(Qonfig::DataSet) expect do - # (incorrect) on the root + # (with incompatible config class) on the root Class.new(Qonfig::DataSet) do compose InappropriateConfig end end.to raise_error(Qonfig::ArgumentError) expect do - # (correct) on the root + # (with compatible config class) on the root Class.new(Qonfig::DataSet) do compose AppropriateConfig end end.not_to raise_error expect do - # (incorrect) nested + # (with incompatible config class) nested Class.new(Qonfig::DataSet) do setting :nested do compose InappropriateConfig @@ -196,7 +196,7 @@ class ProjectConfig < Qonfig::DataSet end.to raise_error(Qonfig::ArgumentError) expect do - # (correct) nested + # (with compatible config class) nested Class.new(Qonfig::DataSet) do setting :nested do compose AppropriateConfig