Module: Soup::Backends

Defined in:
lib/soup/backends.rb,
lib/soup/backends/base.rb,
lib/soup/backends/memory.rb,
lib/soup/backends/read_only.rb,
lib/soup/backends/multi_soup.rb,
lib/soup/backends/file_backend.rb,
lib/soup/backends/yaml_backend.rb

Overview

Backends should implement (or delegate) the following API:

  • #prepare - will be called when a Soup is created

  • #names - should return the names of all snips contained

  • #load_snip(name) - should return a Soup::Snip, or nil if it couldn’t be loaded

  • #save_snip(attribute_hash) - should store and return a Soup::Snip, or nil if it couldn’t be saved

  • #destroy(name) - should return true if the snip was removed, or false if otherwise

Defined Under Namespace

Classes: Base, FileBackend, Memory, MultiSoup, ReadOnly, YAMLBackend