Class: Fluentd::Setting::Section
- Inherits:
-
Object
- Object
- Fluentd::Setting::Section
- Defined in:
- app/models/fluentd/setting/section.rb
Class Method Summary collapse
- .inherited(klass) ⇒ Object
- .init ⇒ Object
-
.merge(**options, &block) ⇒ Object
Don’t overwrite options.
- .section? ⇒ Boolean
Class Method Details
.inherited(klass) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/models/fluentd/setting/section.rb', line 5 def inherited(klass) klass.instance_eval do include ActiveModel::Model include ActiveModel::Attributes include Fluentd::Setting::Configurable include Fluentd::Setting::SectionParser include Fluentd::Setting::PluginParameter include Fluentd::Setting::SectionConfig include Fluentd::Setting::RegistryLoader class_attribute :_klass, :_block, :_blocks class_attribute :section_name, :required, :multi, :alias class_attribute :_dumped_config self._klass = klass self._blocks = [] self._dumped_config = {} end end |
.init ⇒ Object
24 25 26 27 28 29 |
# File 'app/models/fluentd/setting/section.rb', line 24 def init _klass.instance_eval(&_block) _blocks.each do |b| _klass.instance_eval(&b) end end |
.merge(**options, &block) ⇒ Object
Don’t overwrite options
32 33 34 |
# File 'app/models/fluentd/setting/section.rb', line 32 def merge(**, &block) _blocks << block end |
.section? ⇒ Boolean
36 37 38 |
# File 'app/models/fluentd/setting/section.rb', line 36 def section? true end |