Class: Mhtml::RootDocument
Constant Summary
collapse
- BOUNDARY_PREFIX =
'--'.freeze
Instance Attribute Summary collapse
Attributes inherited from Document
#body, #chunked, #encoding, #file_path, #headers, #is_base_64, #is_quoted_printable, #parser, #root_doc
Instance Method Summary
collapse
Methods inherited from Document
#<<, #header, #on_body, #on_header, #relative_file_path
Constructor Details
#initialize(str = nil) ⇒ RootDocument
Returns a new instance of RootDocument.
7
8
9
10
|
# File 'lib/mhtml/root_document.rb', line 7
def initialize(str = nil)
@sub_docs = []
super(str)
end
|
Instance Attribute Details
#boundary ⇒ Object
Returns the value of attribute boundary.
5
6
7
|
# File 'lib/mhtml/root_document.rb', line 5
def boundary
@boundary
end
|
#sub_docs ⇒ Object
Returns the value of attribute sub_docs.
5
6
7
|
# File 'lib/mhtml/root_document.rb', line 5
def sub_docs
@sub_docs
end
|
Instance Method Details
#==(other) ⇒ Object
12
13
14
|
# File 'lib/mhtml/root_document.rb', line 12
def ==(other)
super(other) && @boundary == other.boundary && @sub_docs == other.sub_docs
end
|
#last_boundary_str ⇒ Object
#on_subdoc_begin ⇒ Object
16
17
18
|
# File 'lib/mhtml/root_document.rb', line 16
def on_subdoc_begin
@subdoc_begin_proc = Proc.new
end
|
#on_subdoc_body ⇒ Object
24
25
26
|
# File 'lib/mhtml/root_document.rb', line 24
def on_subdoc_body
@subdoc_body_proc = Proc.new
end
|
#on_subdoc_complete ⇒ Object
28
29
30
|
# File 'lib/mhtml/root_document.rb', line 28
def on_subdoc_complete
@subdoc_complete_proc = Proc.new
end
|
20
21
22
|
# File 'lib/mhtml/root_document.rb', line 20
def
@subdoc_header_proc = Proc.new
end
|
#to_s ⇒ Object
for testing only = no spec implemented