Class/Module Index [+]

Quicksearch

Fog::Parsers::AWS::CloudFormation::DescribeStacks

Public Instance Methods

end_element(name) click to toggle source
# File lib/fog/aws/parsers/cloud_formation/describe_stacks.rb, line 27
def end_element(name)
  if @in_outputs
    case name
    when 'OutputKey', 'OutputValue', 'Description'
      @output[name] = value
    when 'member'
      @stack['Outputs'] << @output
      @output = {}
    when 'Outputs'
      @in_outputs = false
    end
  elsif @in_parameters
    case name
    when 'ParameterKey', 'ParameterValue'
      @parameter[name] = value
    when 'member'
      @stack['Parameters'] << @parameter
      @parameter = {}
    when 'Parameters'
      @in_parameters = false
    end
  elsif @in_capabilities
    case name             
    when 'member'
      @stack['Capabilities'] << value        
    when 'Capabilities'
      @in_capabilities = false
    end  
  else
    case name
    when 'member'
      @response['Stacks'] << @stack
      @stack = { 'Outputs' => [], 'Parameters' => [], 'Capabilities' => []}
    when 'RequestId'
      @response[name] = value
    when 'CreationTime'
      @stack[name] = Time.parse(value)
    when 'DisableRollback'
      case value
      when 'false'
        @stack[name] = false
      when 'true'
        @stack[name] = true
      end
    when 'StackName', 'StackId', 'StackStatus'
      @stack[name] = value
    end
  end
end
reset() click to toggle source
# File lib/fog/aws/parsers/cloud_formation/describe_stacks.rb, line 8
def reset
  @stack = { 'Outputs' => [], 'Parameters' => [], 'Capabilities' => [] }
  @output = {}
  @parameter = {}
  @response = { 'Stacks' => [] }
end
start_element(name, attrs = []) click to toggle source
# File lib/fog/aws/parsers/cloud_formation/describe_stacks.rb, line 15
def start_element(name, attrs = [])
  super
  case name
  when 'Outputs'
    @in_outputs = true
  when 'Parameters'
    @in_parameters = true
  when 'Capabilities'
    @in_capabilities = true
  end            
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.