Sha256: cd1f1fdc4d65c024993214bf11b83c5639d29c61eecf99ff6d0e90a9f64f6ff2

Contents?: true

Size: 317 Bytes

Versions: 1

Compression:

Stored size: 317 Bytes

Contents

# frozen_string_literal: true

module Umwelt::Episode::File
  class Store < Umwelt::Abstract::File::Store
    def call(id, struct)
      mkpath full_path(id).dirname

      full_path(id).write serialize(destruct(struct))
    end

    def full_path(id)
      umwelt_root_path / "episodes/#{id}.json"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
umwelt-0.1.0 lib/umwelt/episode/file/store.rb