class Vines::Storage::Null
A storage implementation that does not persist data to any form of storage. When looking up the storage object for a domain, it's easier to treat a missing domain with a Null
storage than checking for nil.
For example, presence subscription stanzas sent to a pubsub subdomain have no storage. Rather than checking for nil storage or pubsub addresses, it's easier to treat stanzas to pubsub domains as Null
storage that never finds or saves users and their rosters.
Public Instance Methods
find_fragment(jid, node)
click to toggle source
# File lib/vines/storage/null.rb, line 30 def find_fragment(jid, node) nil end
find_user(jid)
click to toggle source
# File lib/vines/storage/null.rb, line 14 def find_user(jid) nil end
find_vcard(jid)
click to toggle source
# File lib/vines/storage/null.rb, line 22 def find_vcard(jid) nil end
save_fragment(jid, node)
click to toggle source
# File lib/vines/storage/null.rb, line 34 def save_fragment(jid, node) # do nothing end
save_user(user)
click to toggle source
# File lib/vines/storage/null.rb, line 18 def save_user(user) # do nothing end
save_vcard(jid, card)
click to toggle source
# File lib/vines/storage/null.rb, line 26 def save_vcard(jid, card) # do nothing end