Sha256: 84a6ab9ab34ef5d9bdbd42660277090b82f3de98c2b265ca741799cb971c7627

Contents?: true

Size: 563 Bytes

Versions: 20

Compression:

Stored size: 563 Bytes

Contents

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

20 entries across 20 versions & 1 rubygems

Version Path
punchblock-0.9.2 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.9.1 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.9.0 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.8.4 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.8.3 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.8.2 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.8.1 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.8.0 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.7.2 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.7.1 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.7.0 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.6.2 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.6.1 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.6.0 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.5.1 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.5.0 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.4.3 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.4.2 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.4.1 lib/punchblock/core_ext/blather/stanza.rb
punchblock-0.4.0 lib/punchblock/core_ext/blather/stanza.rb