Sha256: e7ce93fc9f41723b615a6c1006772c708fc99eeb2b59e8c2d91fdeb4f031e8df

Contents?: true

Size: 582 Bytes

Versions: 2

Compression:

Stored size: 582 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, call_id, 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

2 entries across 2 versions & 1 rubygems

Version Path
punchblock-0.11.0 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.10.0 lib/punchblock/core_ext/blather/stanza.rb