Module: Mml::Base::Content::Apply

Included in:
V2::Apply, V3::Apply, V4::Apply
Defined in:
lib/mml/base/content/apply.rb

Overview

The apply element applies a function to its arguments. First child is the operator, remaining children are operands.

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/mml/base/content/apply.rb', line 9

def self.included(klass)
  klass.class_eval do
    attribute :definition_url, :string
    attribute :encoding_value, :string

    xml do
      namespace Mml::Namespace
      element "apply"
      mixed_content

      map_attribute "definitionURL", to: :definition_url
      map_attribute "encoding", to: :encoding_value
    end
  end
end