Class: RbEAI::GetLogic

Inherits:
Object
  • Object
show all
Defined in:
lib/rbeai/GetLogic.rb

Instance Method Summary collapse

Constructor Details

#initialize(xmlDoc, task) ⇒ GetLogic

Returns a new instance of GetLogic.



14
15
16
17
18
19
20
21
22
23
# File 'lib/rbeai/GetLogic.rb', line 14

def initialize(xmlDoc, task)
  @task = task
  protNode = XPath.first(xmlDoc, "./protocol")
  protocol = protNode.attributes["def"]
  @logic =  case protocol
            when "file"  then GetFileLogic.new(protNode, task)
		when "ftp"  then GetFtpLogic.new(protNode, task)
            when "email" then GetEmailLogic.new(protNode, task)
            end
end

Instance Method Details

#getFilesObject



25
26
27
# File 'lib/rbeai/GetLogic.rb', line 25

def getFiles()
  return @logic.getFiles()
end