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.



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



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

Returns:

  • (Boolean)


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

def valid?
  true
end