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 61
def +(other)
  Section.new(self.to_h.merge(other.to_h))
end
[](key) click to toggle source
# File lib/fluent/config/section.rb, line 74
def [](key)
  @params[key.to_sym]
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
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 65
def instance_of?(mod)
  @klass == mod.name
end
is_a?(mod)
Alias for: kind_of?
kind_of?(mod) click to toggle source
# File lib/fluent/config/section.rb, line 69
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 95
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 53
def nil?
  false
end
respond_to?(symbol, include_all=false) click to toggle source
# File lib/fluent/config/section.rb, line 78
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 91
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 57
def to_h
  @params
end
to_s() click to toggle source
# File lib/fluent/config/section.rb, line 45
def to_s
  inspect
end