Sha256: 312265b68a5035dac26e694cf4be9fe95a426552636842f06a20017aae1745d8
Contents?: true
Size: 495 Bytes
Versions: 6
Compression:
Stored size: 495 Bytes
Contents
module PostalMethods module DocumentProcessor def document=(doc) unless doc.class == File doc = open(doc) end self.to_send = {} if self.to_send.nil? self.to_send[:extension] = doc.path.to_s.split('.').last self.to_send[:bytes] = doc.read self.to_send[:name] = File.basename(doc.path) self.to_send[:file_obj] = doc end def document? true unless self.to_send.nil? end def document self.to_send end end end
Version data entries
6 entries across 6 versions & 1 rubygems