class Fluent::Config::Section
Public Class Methods
name()
click to toggle source
# File lib/fluent/config/section.rb, line 25 def self.name 'Fluent::Config::Section' end
new(params = {}, config_element = nil)
click to toggle source
# File lib/fluent/config/section.rb, line 29 def initialize(params = {}, config_element = nil) @klass = 'Fluent::Config::Section' @params = params @corresponding_config_element = config_element end
Public Instance Methods
+(other)
click to toggle source
# File lib/fluent/config/section.rb, line 70 def +(other) Section.new(self.to_h.merge(other.to_h)) end
[](key)
click to toggle source
# File lib/fluent/config/section.rb, line 83 def [](key) @params[key.to_sym] end
[]=(key, value)
click to toggle source
# File lib/fluent/config/section.rb, line 87 def []=(key, value) @params[key.to_sym] = value end
class()
click to toggle source
# File lib/fluent/config/section.rb, line 41 def class Section end
corresponding_config_element()
click to toggle source
# File lib/fluent/config/section.rb, line 37 def corresponding_config_element @corresponding_config_element end
dup()
click to toggle source
# File lib/fluent/config/section.rb, line 66 def dup Section.new(@params.dup, @corresponding_config_element.dup) end
inspect()
click to toggle source
# File lib/fluent/config/section.rb, line 49 def inspect "<Fluent::Config::Section #{@params.to_json}>" end
instance_of?(mod)
click to toggle source
# File lib/fluent/config/section.rb, line 74 def instance_of?(mod) @klass == mod.name end
kind_of?(mod)
click to toggle source
# File lib/fluent/config/section.rb, line 78 def kind_of?(mod) @klass == mod.name || BasicObject == mod end
Also aliased as: is_a?
method_missing(name, *args)
click to toggle source
# File lib/fluent/config/section.rb, line 108 def method_missing(name, *args) if @params.has_key?(name) @params[name] else ::Kernel.raise ::NoMethodError, "undefined method `#{name}' for #{self.inspect}" end end
nil?()
click to toggle source
# File lib/fluent/config/section.rb, line 58 def nil? false end
pretty_print(q)
click to toggle source
Used by PP and Pry
# File lib/fluent/config/section.rb, line 54 def pretty_print(q) q.text(inspect) end
respond_to?(symbol, include_all=false)
click to toggle source
# File lib/fluent/config/section.rb, line 91 def respond_to?(symbol, include_all=false) case symbol when :inspect, :nil?, :to_h, :+, :instance_of?, :kind_of?, :[], :respond_to?, :respond_to_missing? true when :!, :!= , :==, :equal?, :instance_eval, :instance_exec true when :method_missing, :singleton_method_added, :singleton_method_removed, :singleton_method_undefined include_all else false end end
respond_to_missing?(symbol, include_private)
click to toggle source
# File lib/fluent/config/section.rb, line 104 def respond_to_missing?(symbol, include_private) @params.has_key?(symbol) end
to_h()
click to toggle source
# File lib/fluent/config/section.rb, line 62 def to_h @params end
to_s()
click to toggle source
# File lib/fluent/config/section.rb, line 45 def to_s inspect end