Class: Hyrax::DerivativeService

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/derivative_service.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_setObject (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_derivativesObject



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

Returns:

  • (Boolean)


23
24
25
# File 'app/services/hyrax/derivative_service.rb', line 23

def valid?
  true
end