Module: ElasticAPM::Fields::ClassMethods

Defined in:
lib/elastic_apm/fields.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#schemaObject (readonly)

Returns the value of attribute schema.



88
89
90
# File 'lib/elastic_apm/fields.rb', line 88

def schema
  @schema
end

Instance Method Details

#field(key, default: nil) ⇒ Object



81
82
83
84
85
86
# File 'lib/elastic_apm/fields.rb', line 81

def field(key, default: nil)
  field = Field.new(key, default: default)
  schema[key] = field

  attr_accessor(key)
end