Class: Valkyrie::Storage::Shrine::IDPathGenerator
- Inherits:
-
Object
- Object
- Valkyrie::Storage::Shrine::IDPathGenerator
- Defined in:
- lib/valkyrie/storage/shrine.rb
Instance Method Summary collapse
- #generate(resource:, file:, original_filename:) ⇒ Object
-
#initialize(base_path: nil) ⇒ IDPathGenerator
constructor
A new instance of IDPathGenerator.
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 |