Class AWS::Core::XML::Grammar
In: lib/aws/core/xml/grammar.rb
Parent: Object

A class that simplifies building XML {Parser} rules. This is also a compatability layer between the old and new formats of the api config.

Methods

Attributes

rules  [R]  @return [Hash] Returns a hash of rules defined by this grammar.

Public Class methods

Protected Class methods

Performs a deep copy of the rules hash so that it can be customized without chaning the parent grammar.

Public Instance methods

Returns a new grammar (leaving the current one un-modified) with the given customizations applied. Customizations can be given in a hash-form or in a block form.

@example Block-form customizations

  grammar.customize do
    element "EnumElement" do
      symbol_value
      list
    end
  end

@example Hash-form customizations

  grammar.customize "EnumElement" => [:symbol_value, :list]

@return [Grammar] Returns a grammar with the given customizations

  applied.

Applies customizations to the current grammar, not returning a new grammar.

Parses the XML with the rules provided by the current grammar. This method is meant to provide backwards compatability with the old XmlGrammar class that handled rules and parsing. @param [String] xml @return [Data] Returns a hash-like parsed response.

Protected Instance methods

==(other)

Alias for eql?

blob()

Alias for blob_value

boolean()

Alias for boolean_value

datetime()

Alias for datetime_value

float()

Alias for float_value

http_header(*args;)

Alias for http_trait

http_payload(*args;)

Alias for http_trait

http_status(*args;)

Alias for http_trait

http_uri_label(*args;)

Alias for http_trait

integer()

Alias for integer_value

long()

Alias for integer_value

string()

Alias for string_value

symbol()

Alias for symbol_value

time()

Alias for time_value

timestamp()

Alias for time_value

[Validate]