Class: Datadog::Statsd::Schema::SchemaBuilder::TransformerBuilder Private
- Inherits:
-
Object
- Object
- Datadog::Statsd::Schema::SchemaBuilder::TransformerBuilder
- Defined in:
- lib/datadog/statsd/schema/schema_builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Helper class for building transformers within the DSL
Instance Method Summary collapse
-
#initialize(transformers) ⇒ TransformerBuilder
constructor
private
Initialize with the transformers hash.
-
#method_missing(name, proc = nil) {|Object| ... } ⇒ void
private
Dynamic method to define transformers.
-
#respond_to_missing?(_name, _include_private = false) ⇒ Boolean
private
Always respond to any method for transformer definition.
Constructor Details
#initialize(transformers) ⇒ TransformerBuilder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize with the transformers hash
93 94 95 |
# File 'lib/datadog/statsd/schema/schema_builder.rb', line 93 def initialize(transformers) @transformers = transformers end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, proc = nil) {|Object| ... } ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Dynamic method to define transformers
102 103 104 |
# File 'lib/datadog/statsd/schema/schema_builder.rb', line 102 def method_missing(name, proc = nil, &block) @transformers[name.to_sym] = proc || block end |
Instance Method Details
#respond_to_missing?(_name, _include_private = false) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Always respond to any method for transformer definition
110 111 112 |
# File 'lib/datadog/statsd/schema/schema_builder.rb', line 110 def respond_to_missing?(_name, _include_private = false) true end |