Class: Hyrax::DerivativeService
- Inherits:
-
Object
- Object
- Hyrax::DerivativeService
- Defined in:
- app/services/hyrax/derivative_service.rb
Instance Attribute Summary collapse
-
#file_set ⇒ Object
readonly
Returns the value of attribute file_set.
Class Method Summary collapse
Instance Method Summary collapse
- #cleanup_derivatives ⇒ Object
- #create_derivatives(_file_path) ⇒ Object
-
#derivative_url(_destination_name) ⇒ Object
What should this return?.
-
#initialize(file_set) ⇒ DerivativeService
constructor
A new instance of DerivativeService.
- #valid? ⇒ Boolean
Constructor Details
#initialize(file_set) ⇒ DerivativeService
Returns a new instance of DerivativeService.
11 12 13 |
# File 'app/services/hyrax/derivative_service.rb', line 11 def initialize(file_set) @file_set = file_set end |
Instance Attribute Details
#file_set ⇒ Object (readonly)
Returns the value of attribute file_set.
9 10 11 |
# File 'app/services/hyrax/derivative_service.rb', line 9 def file_set @file_set end |
Class Method Details
.for(file_set) ⇒ Object
5 6 7 8 |
# File 'app/services/hyrax/derivative_service.rb', line 5 def self.for(file_set) services.map { |service| service.new(file_set) }.find(&:valid?) || new(file_set) end |
Instance Method Details
#cleanup_derivatives ⇒ Object
15 |
# File 'app/services/hyrax/derivative_service.rb', line 15 def cleanup_derivatives; end |
#create_derivatives(_file_path) ⇒ Object
17 |
# File 'app/services/hyrax/derivative_service.rb', line 17 def create_derivatives(_file_path); end |
#derivative_url(_destination_name) ⇒ Object
What should this return?
20 21 22 |
# File 'app/services/hyrax/derivative_service.rb', line 20 def derivative_url(_destination_name) "" end |
#valid? ⇒ Boolean
24 25 26 |
# File 'app/services/hyrax/derivative_service.rb', line 24 def valid? true end |