Method: OpenCensus::Common::Config#initialize

Defined in:
lib/opencensus/common/config.rb

#initialize {|_self| ... } ⇒ Config

Constructs a Configuration object. If a block is given, yields self to the block, which makes it convenient to initialize the structure by making calls to #add_option!, #add_config!, and #add_alias!.

Yields:

  • (_self)

Yield Parameters:



85
86
87
88
# File 'lib/opencensus/common/config.rb', line 85

def initialize
  @fields = {}
  yield self if block_given?
end