class Aws::Xml::Parser::Stack
Attributes
Public Class Methods
Source
# File lib/aws-sdk-core/xml/parser/stack.rb, line 8 def initialize(ref, result = nil, &unhandled_callback) @ref = ref @frame = self @result = result @unhandled_callback = unhandled_callback end
Public Instance Methods
Source
# File lib/aws-sdk-core/xml/parser/stack.rb, line 23 def attr(name, value) if name.to_s == 'encoding' && value.to_s == 'base64' @frame = BlobFrame.new(name, @frame.parent, @frame.ref) else # don't try to parse shapes from xml namespace return if name.to_s == 'xmlns' start_element(name) text(value) end_element(name) end end
Source
# File lib/aws-sdk-core/xml/parser/stack.rb, line 52 def child_frame(name) Frame.new(name, self, @ref, @result) end
Source
# File lib/aws-sdk-core/xml/parser/stack.rb, line 56 def consume_child_frame(frame) @result = frame.result end
Source
# File lib/aws-sdk-core/xml/parser/stack.rb, line 39 def end_element(*args) @frame.parent.consume_child_frame(@frame) if @frame.parent.is_a?(FlatListFrame) @frame = @frame.parent @frame.parent.consume_child_frame(@frame) end @frame = @frame.parent end
Source
# File lib/aws-sdk-core/xml/parser/stack.rb, line 48 def error(msg, line = nil, column = nil) raise ParsingError.new(msg, line, column) end
Source
# File lib/aws-sdk-core/xml/parser/stack.rb, line 19 def start_element(name) @frame = @frame.child_frame(name.to_s) end
Source
# File lib/aws-sdk-core/xml/parser/stack.rb, line 35 def text(value) @frame.set_text(value) end
Source
# File lib/aws-sdk-core/xml/parser/stack.rb, line 61 def yield_unhandled_value(path, value) if @unhandled_callback @unhandled_callback.call(path, value) end end
@api private