class Conjur::Policy::YAML::Handler::Root

Handles the root document, which should be a sequence.

Attributes

handler[R]
result[R]

Public Class Methods

new(handler) click to toggle source
# File lib/conjur/policy/yaml/handler.rb, line 99
def initialize handler
  super nil, nil
  
  @handler = handler
  @result = nil
end

Public Instance Methods

end_sequence() click to toggle source

Finish the sequence, and the document.

# File lib/conjur/policy/yaml/handler.rb, line 123
def end_sequence
  pop_handler
end
sequence(seq) click to toggle source
# File lib/conjur/policy/yaml/handler.rb, line 108
def sequence seq
  raise "Already got sequence result" if @result
  @result = seq
end
start_sequence(anchor) click to toggle source

The document root is expected to start with a sequence. A Sequence handler is constructed with no implicit type. This sub-handler handles the message.

# File lib/conjur/policy/yaml/handler.rb, line 116
def start_sequence anchor
  Sequence.new(self, anchor, nil).tap do |h|
    h.push_handler
  end
end