Class: RbEAI::PutLogic

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

Instance Method Summary collapse

Constructor Details

#initialize(xmlDoc, task) ⇒ PutLogic

Returns a new instance of PutLogic.



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

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

Instance Method Details

#putFile(obj) ⇒ Object



24
25
26
# File 'lib/rbeai/PutLogic.rb', line 24

def putFile(obj)
  return @logic.putFile(obj)
end