module ElasticAPM::Fields
An interface for creating simple, value holding objects that correspond to object fields in the API.
Example:
class MyThing include Fields field :name field :address, default: 'There' end MyThing.new(name: 'AJ').to_h # => { name: 'AJ' } MyThing.new().empty? # => true
Public Class Methods
included(cls)
click to toggle source
# File lib/elastic_apm/fields.rb, line 91 def self.included(cls) cls.extend(ClassMethods) cls.include(InstanceMethods) cls.instance_variable_set(:@schema, {}) end