Class: Link

Inherits:
Object
  • Object
show all
Defined in:
lib/stanzas/notification_stanza.rb

Overview

Repesents the items published by the firehoser (the feed entries). They have accessors for the following fields :

  • title

  • summary

  • link

  • published

  • unique_id

  • chunks (long entries might be notified in several chunks)

  • chunk (current chunk out of chunks)

<item xmlns=“jabber.org/protocol/pubsub” chunks=“2” chunk=“1”>

<entry xmlns="http://www.w3.org/2005/Atom" xml:lang="">
    <title>cool</title>
    <content type="text">cool</content>
    <id>tag:pubhubsubbub-example-app,2009:ahhwdWJzdWJodWJidWItZXhhbXBsZS1hcHByDQsSBUVudHJ5GMGOEAw</id>
    <published>2010-03-25T16:57:18Z</published>
    <link type="text/html" href="http://pubsubhubbub-example-app.appspot.com/ahhwdWJzdWJodWJidWItZXhhbXBsZS1hcHByDQsSBUVudHJ5GMGOEAw" title="" rel="alternate"/>
</entry>

</item>

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Link

Returns a new instance of Link.



23
24
25
# File 'lib/stanzas/notification_stanza.rb', line 23

def initialize(node)
  @node = node
end

Instance Method Details

#hrefObject



31
32
33
# File 'lib/stanzas/notification_stanza.rb', line 31

def href
  @node["href"]
end

#relObject



35
36
37
# File 'lib/stanzas/notification_stanza.rb', line 35

def rel
  @node["rel"]
end

#titleObject



27
28
29
# File 'lib/stanzas/notification_stanza.rb', line 27

def title
  @node["title"]
end

#typeObject



39
40
41
# File 'lib/stanzas/notification_stanza.rb', line 39

def type
  @node["type"]
end