Parent

Files

Class Index [+]

Quicksearch

SOAP::Attachment

Attributes

io[R]
contenttype[RW]

Public Class Methods

contentid(obj) click to toggle source
    # File lib/soap/attachment.rb, line 77
77:   def self.contentid(obj)
78:     # this needs to be fixed
79:     [obj.__id__.to_s, Process.pid.to_s].join('.')
80:   end
mime_contentid(obj) click to toggle source
    # File lib/soap/attachment.rb, line 82
82:   def self.mime_contentid(obj)
83:     '<' + contentid(obj) + '>'
84:   end
new(string_or_readable = nil) click to toggle source
    # File lib/soap/attachment.rb, line 36
36:   def initialize(string_or_readable = nil)
37:     @string_or_readable = string_or_readable
38:     @contenttype = "application/octet-stream"
39:     @contentid = nil
40:     @content = nil
41:   end

Public Instance Methods

content() click to toggle source
    # File lib/soap/attachment.rb, line 55
55:   def content
56:     if @content == nil and @string_or_readable != nil
57:       @content = @string_or_readable.respond_to?(:read) ?
58:         @string_or_readable.read : @string_or_readable
59:     end
60:     @content
61:   end
contentid() click to toggle source
    # File lib/soap/attachment.rb, line 43
43:   def contentid
44:     @contentid ||= Attachment.contentid(self)
45:   end
contentid=(contentid) click to toggle source
    # File lib/soap/attachment.rb, line 47
47:   def contentid=(contentid)
48:     @contentid = contentid
49:   end
mime_contentid() click to toggle source
    # File lib/soap/attachment.rb, line 51
51:   def mime_contentid
52:     '<' + contentid + '>'
53:   end
save(filename) click to toggle source
    # File lib/soap/attachment.rb, line 71
71:   def save(filename)
72:     File.open(filename, "wb") do |f|
73:       write(f)
74:     end
75:   end
to_s() click to toggle source
    # File lib/soap/attachment.rb, line 63
63:   def to_s
64:     content
65:   end
write(out) click to toggle source
    # File lib/soap/attachment.rb, line 67
67:   def write(out)
68:     out.write(content)
69:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.