class Datadog::Configuration::OptionDefinition

Represents a definition for an integration configuration option

Constants

IDENTITY

Attributes

default[R]
delegate_to[R]
depends_on[R]
lazy[R]
name[R]
on_set[R]
resetter[R]
setter[R]

Public Class Methods

new(name, meta = {}, &block) click to toggle source
# File lib/ddtrace/configuration/option_definition.rb, line 20
def initialize(name, meta = {}, &block)
  @default = meta[:default]
  @delegate_to = meta[:delegate_to]
  @depends_on = meta[:depends_on] || []
  @lazy = meta[:lazy] || false
  @name = name.to_sym
  @on_set = meta[:on_set]
  @resetter = meta[:resetter]
  @setter = meta[:setter] || block || IDENTITY
end

Public Instance Methods

build(context) click to toggle source

Creates a new Option, bound to the context provided.

# File lib/ddtrace/configuration/option_definition.rb, line 32
def build(context)
  Option.new(self, context)
end