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.
10 11 12 |
# File 'app/services/hyrax/derivative_service.rb', line 10 def initialize(file_set) @file_set = file_set end |
Instance Attribute Details
#file_set ⇒ Object (readonly)
Returns the value of attribute file_set.
8 9 10 |
# File 'app/services/hyrax/derivative_service.rb', line 8 def file_set @file_set end |
Class Method Details
.for(file_set) ⇒ Object
4 5 6 7 |
# File 'app/services/hyrax/derivative_service.rb', line 4 def self.for(file_set) services.map { |service| service.new(file_set) }.find(&:valid?) || new(file_set) end |
Instance Method Details
#cleanup_derivatives ⇒ Object
14 |
# File 'app/services/hyrax/derivative_service.rb', line 14 def cleanup_derivatives; end |
#create_derivatives(_file_path) ⇒ Object
16 |
# File 'app/services/hyrax/derivative_service.rb', line 16 def create_derivatives(_file_path); end |
#derivative_url(_destination_name) ⇒ Object
What should this return?
19 20 21 |
# File 'app/services/hyrax/derivative_service.rb', line 19 def derivative_url(_destination_name) "" end |
#valid? ⇒ Boolean
23 24 25 |
# File 'app/services/hyrax/derivative_service.rb', line 23 def valid? true end |