Sha256: 0295100e7519a1fa60a7bfc86996fac811fc178d1324bbd6920c761a8fa4da10
Contents?: true
Size: 618 Bytes
Versions: 15
Compression:
Stored size: 618 Bytes
Contents
module Datadog module Configuration # Represents a definition for an integration configuration option class OptionDefinition IDENTITY = ->(x) { x } attr_reader \ :default, :depends_on, :lazy, :name, :setter def initialize(name, meta = {}, &block) @default = meta[:default] @depends_on = meta[:depends_on] || [] @lazy = meta[:lazy] || false @name = name.to_sym @setter = meta[:setter] || block || IDENTITY end def default_value lazy ? @default.call : @default end end end end
Version data entries
15 entries across 15 versions & 1 rubygems