Sha256: 25706ac893bf67260515e0ada9f9bd4f8a3f18c7cf4c5c4e50330efcbad904b3
Contents?: true
Size: 524 Bytes
Versions: 2
Compression:
Stored size: 524 Bytes
Contents
# frozen_string_literal: true module ActiveStorage class Service::DummyService < Service def initialize(**config) @config = config end def exist?(key) instrument :exist, key: key do |payload| true end end def url(key, expires_in:, filename: nil, content_type:, disposition:, params: {}) instrument :url, key: key do |payload| urls.sample end end private attr_reader :config def urls config.fetch(:urls) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
activestorage-dummy-0.1.1 | lib/active_storage/service/dummy_service.rb |
activestorage-dummy-0.1.0 | lib/active_storage/service/dummy_service.rb |