Sha256: 13c36f3be544b89da60e49bd043023b4e07a6c2532facfec3dc7d7bdc8d9d07e

Contents?: true

Size: 310 Bytes

Versions: 3

Compression:

Stored size: 310 Bytes

Contents

# frozen_string_literal: true

module JsonStatham
  module Requests
    class Writer < Base
      def call
        FileUtils.mkdir_p(base_path)

        File.write(file_path, JSON.dump(dump))
      end

      def dump
        { schema: current_schema, duration: observer.duration }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
json_statham-0.1.3 lib/json_statham/requests/writer.rb
json_statham-0.1.2 lib/json_statham/requests/writer.rb
json_statham-0.1.0 lib/json_statham/requests/writer.rb