Method: Logtail::Contexts::Release#to_hash

Defined in:
lib/logtail/contexts/release.rb

#to_hashObject

Builds a hash representation containing simple objects, suitable for serialization (JSON).



41
42
43
44
45
46
47
48
49
# File 'lib/logtail/contexts/release.rb', line 41

def to_hash
  @to_hash ||= {
    release: Util::NonNilHashBuilder.build do |h|
      h.add(:commit_hash, commit_hash)
      h.add(:created_at, created_at)
      h.add(:version, version)
    end
  }
end