Class: Qonfig::Commands::Compose Private
- Defined in:
- lib/qonfig/commands/compose.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #data_set_klass ⇒ Qonfig::DataSet readonly private
Instance Method Summary collapse
- #call(settings) ⇒ void private
-
#initialize(data_set_klass) ⇒ Compose
constructor
private
A new instance of Compose.
Constructor Details
#initialize(data_set_klass) ⇒ Compose
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Compose.
20 21 22 23 24 25 26 27 |
# File 'lib/qonfig/commands/compose.rb', line 20 def initialize(data_set_klass) raise( Qonfig::ArgumentError, 'Composed config class should be a subtype of Qonfig::DataSet' ) unless data_set_klass.is_a?(Class) && data_set_klass < Qonfig::DataSet @data_set_klass = data_set_klass end |
Instance Attribute Details
#data_set_klass ⇒ Qonfig::DataSet (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/qonfig/commands/compose.rb', line 12 def data_set_klass @data_set_klass end |
Instance Method Details
#call(settings) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
34 35 36 37 38 |
# File 'lib/qonfig/commands/compose.rb', line 34 def call(settings) composite_settings = data_set_klass.new.settings settings.__append_settings__(composite_settings) end |