Sha256: 615c0bbbd31c55435566abfeca437757f468c05ac671bf1d0a96100fafc776f7

Contents?: true

Size: 541 Bytes

Versions: 54

Compression:

Stored size: 541 Bytes

Contents

module Plivo
  module XML
    class Emphasis < Element
      @nestables = %w(Break Cont Emphasis Lang Phoneme Prosody SayAs Sub W)
      @valid_attributes = %w(level)

      VALID_LEVEL_ATTRIBUTE_VALUE=%w(strong moderate reduced)

      def initialize(body, attributes = {})
        if attributes && attributes[:level] && !VALID_LEVEL_ATTRIBUTE_VALUE.include?(attributes[:level])
          raise PlivoXMLError, "invalid attribute value #{attributes[:level]} for level"
        end
        super(body, attributes)
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
plivo-4.61.2 lib/plivo/xml/emphasis.rb
plivo-4.61.1 lib/plivo/xml/emphasis.rb
plivo-4.61.0 lib/plivo/xml/emphasis.rb
plivo-4.60.3 lib/plivo/xml/emphasis.rb
plivo-4.60.2 lib/plivo/xml/emphasis.rb
plivo-4.60.1 lib/plivo/xml/emphasis.rb
plivo-4.60.0 lib/plivo/xml/emphasis.rb
plivo-4.59.1 lib/plivo/xml/emphasis.rb
plivo-4.59.0 lib/plivo/xml/emphasis.rb
plivo-4.56.0 lib/plivo/xml/emphasis.rb
plivo-4.55.2 lib/plivo/xml/emphasis.rb
plivo-4.55.1 lib/plivo/xml/emphasis.rb
plivo-4.55.0 lib/plivo/xml/emphasis.rb
plivo-4.54.0 lib/plivo/xml/emphasis.rb
plivo-4.53.1 lib/plivo/xml/emphasis.rb
plivo-4.53.0 lib/plivo/xml/emphasis.rb
plivo-4.52.0 lib/plivo/xml/emphasis.rb
plivo-4.51.0 lib/plivo/xml/emphasis.rb
plivo-4.50.0 lib/plivo/xml/emphasis.rb
plivo-4.49.0 lib/plivo/xml/emphasis.rb