Class: Cul::Fedora::Arm::Tasks::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/cul/fedora/arm/tasks.rb

Direct Known Subclasses

InsertTask, PurgeTask, ReservePidsTask, UpdateTask

Instance Method Summary collapse

Constructor Details

#initializeTask

Returns a new instance of Task.



14
15
16
17
18
# File 'lib/cul/fedora/arm/tasks.rb', line 14

def initialize()
  super()
  @apim = nil
  @args = {}
end

Instance Method Details

#post(connector) ⇒ Object



19
20
21
22
23
24
25
26
27
28
# File 'lib/cul/fedora/arm/tasks.rb', line 19

def post(connector)
  if (@apim.nil?)
    raise "Missing APIM SOAPAction name"
  end
  if (@args.empty?)
    raise "No soap arguments"    
  end
  @response = connector.apim_call(@apim, @args) unless (@apim.nil? or @args.empty?)
  @response
end

#responseObject



11
12
13
# File 'lib/cul/fedora/arm/tasks.rb', line 11

def response
  @response
end