module ElasticAPM::Fields::InstanceMethods
Public Class Methods
new(**attrs)
click to toggle source
Calls superclass method
# File lib/elastic_apm/fields.rb, line 37 def initialize(**attrs) attrs.each do |key, value| self.send(:"#{key}=", value) end super() end
Public Instance Methods
empty?()
click to toggle source
# File lib/elastic_apm/fields.rb, line 45 def empty? self.class.fields.each do |key| next if send(key) next if optionals.include?(key) return true end false end
to_h()
click to toggle source
# File lib/elastic_apm/fields.rb, line 56 def to_h self.class.fields.each_with_object({}) do |key, fields| fields[key] = send(key) end end
Private Instance Methods
optionals()
click to toggle source
# File lib/elastic_apm/fields.rb, line 64 def optionals self.class.optionals end