Class: Service::DummyService
- Inherits:
-
Service
- Object
- Service
- Service::DummyService
- Defined in:
- lib/active_storage/service/dummy_service.rb
Instance Method Summary collapse
- #exist?(key) ⇒ Boolean
-
#initialize(**config) ⇒ DummyService
constructor
A new instance of DummyService.
- #url(key, expires_in:, filename: nil, content_type:, disposition:, params: {}) ⇒ Object
Constructor Details
#initialize(**config) ⇒ DummyService
Returns a new instance of DummyService.
4 5 6 |
# File 'lib/active_storage/service/dummy_service.rb', line 4 def initialize(**config) @config = config end |
Instance Method Details
#exist?(key) ⇒ Boolean
8 9 10 11 12 |
# File 'lib/active_storage/service/dummy_service.rb', line 8 def exist?(key) instrument :exist, key: key do |payload| true end end |
#url(key, expires_in:, filename: nil, content_type:, disposition:, params: {}) ⇒ Object
14 15 16 17 18 |
# File 'lib/active_storage/service/dummy_service.rb', line 14 def url(key, expires_in:, filename: nil, content_type:, disposition:, params: {}) instrument :url, key: key do |payload| urls.sample end end |