Class: Superfeedr::Status
- Inherits:
-
Blather::XMPPNode
- Object
- Blather::XMPPNode
- Superfeedr::Status
- Defined in:
- lib/superfeedr/status.rb
Constant Summary collapse
- NS =
'http://superfeedr.com/xmpp-pubsub-ext'.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.parse(node) ⇒ Object
7 8 9 |
# File 'lib/superfeedr/status.rb', line 7 def self.parse(node) self.new('status').inherit node.find_first('//ns:status', :ns => NS) end |
Instance Method Details
#code ⇒ Object
19 20 21 |
# File 'lib/superfeedr/status.rb', line 19 def code self.http_node[:code].to_i end |
#failed? ⇒ Boolean
11 12 13 |
# File 'lib/superfeedr/status.rb', line 11 def failed? false end |
#feed ⇒ Object
15 16 17 |
# File 'lib/superfeedr/status.rb', line 15 def feed self[:feed] end |
#http ⇒ Object
23 24 25 |
# File 'lib/superfeedr/status.rb', line 23 def http self.http_node.content end |
#next_fetch ⇒ Object
27 28 29 30 31 |
# File 'lib/superfeedr/status.rb', line 27 def next_fetch if next_fetch = self.find_first('//ns:next_fetch', :ns => NS).content DateTime.parse next_fetch end end |