Sha256: 8daab406215a365a4db8f0f0bc1e3d7240f30f44fcf42b3be83f949d5a0af556

Contents?: true

Size: 578 Bytes

Versions: 4

Compression:

Stored size: 578 Bytes

Contents

# encoding: utf-8

module Blather
  class Stanza
    ##
    # @return [Punchblock::RayoNode] a child of RayoNode
    #   representing the Rayo command/event contained within the stanza
    #
    def rayo_node
      first_child = children.first
      Punchblock::RayoNode.import first_child, nil, component_id if first_child
    end

    ##
    # @return [String] the call ID this stanza applies to
    #
    def call_id
      from.node
    end

    ##
    # @return [String] the command ID this stanza applies to
    #
    def component_id
      from.resource
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
punchblock-1.2.0 lib/punchblock/core_ext/blather/stanza.rb
punchblock-1.1.0 lib/punchblock/core_ext/blather/stanza.rb
punchblock-1.0.0 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.12.0 lib/punchblock/core_ext/blather/stanza.rb