Class: Valkyrie::Storage::Shrine::IDPathGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/valkyrie/storage/shrine.rb

Instance Method Summary collapse

Constructor Details

#initialize(base_path: nil) ⇒ IDPathGenerator

Returns a new instance of IDPathGenerator.



14
15
16
# File 'lib/valkyrie/storage/shrine.rb', line 14

def initialize(base_path: nil)
  @base_path = base_path
end

Instance Method Details

#generate(resource:, file:, original_filename:) ⇒ Object



18
19
20
# File 'lib/valkyrie/storage/shrine.rb', line 18

def generate(resource:, file:, original_filename:)
  resource.id.to_s
end