class XmlConv::Util::Destination
Constants
- STATUS_COMPARABLE
Attributes
path[RW]
status[RW]
uri[R]
Public Class Methods
book(str, tmp=nil)
click to toggle source
# File lib/xmlconv/util/destination.rb, line 27 def Destination.book(str, tmp=nil) uri = URI.parse(str) tmp = URI.parse(tmp) if tmp case uri.scheme.to_s.downcase when 'http' DestinationHttp.new(uri) when 'ftp' DestinationFtp.new(uri, tmp) when 'sftp' DestinationSftp.new(uri) when 'mailto' DestinationMail.new(uri) else DestinationDir.new(uri) end end
new()
click to toggle source
# File lib/xmlconv/util/destination.rb, line 43 def initialize @status = :open end
Public Instance Methods
deliver(delivery)
click to toggle source
# File lib/xmlconv/util/destination.rb, line 46 def deliver(delivery) raise 'Abstract Method deliver called in Destination' end
forget_credentials!()
click to toggle source
# File lib/xmlconv/util/destination.rb, line 57 def forget_credentials! end
sanitize(str)
click to toggle source
# File lib/xmlconv/util/destination.rb, line 54 def sanitize(str) str.to_s.gsub(/[^a-zA-Z0-9 _.]/, '').gsub(' ', '+') end
status_comparable()
click to toggle source
# File lib/xmlconv/util/destination.rb, line 51 def status_comparable self::class::STATUS_COMPARABLE[@status].to_i end
update_status()
click to toggle source
# File lib/xmlconv/util/destination.rb, line 49 def update_status end