Module: Culerity::PersistentDelivery

### Home Classes Methods

### In Files

- lib/culerity/persistent_delivery.rb

### Methods

- ::clear_deliveries
- ::deliveries
- ::included
- #perform_delivery_persistent

### Class/Module Index

Quicksearch

- Culerity
- Culerity::CelerityServer
- Culerity::CulerityException
- Culerity::PersistentDelivery
- Culerity::RemoteBrowserProxy
- Culerity::RemoteObjectProxy
- Culerity::ServerCommands
- Object

No matching classes.

# Culerity::PersistentDelivery

### Constants

DELIVERIES_PATH

### Public Class Methods

clear_deliveries() click to toggle source

    # File lib/culerity/persistent_delivery.rb, line 18
    def self.clear_deliveries
      FileUtils.rm_f DELIVERIES_PATH
    end

deliveries() click to toggle source

    # File lib/culerity/persistent_delivery.rb, line 11
    def self.deliveries
      return [] unless File.exist?(DELIVERIES_PATH)
      File.open(DELIVERIES_PATH,'r') do |f|
        Marshal.load(f)
      end
    end

included(base) click to toggle source

    # File lib/culerity/persistent_delivery.rb, line 9
    def self.included(base)
      base.class_eval do
        def self.deliveries
          return [] unless File.exist?(DELIVERIES_PATH)
          File.open(DELIVERIES_PATH,'r') do |f|
            Marshal.load(f)
          end
        end

        def self.clear_deliveries
          FileUtils.rm_f DELIVERIES_PATH
        end
      end
    end

### Public Instance Methods

perform_delivery_persistent(mail) click to toggle source

    # File lib/culerity/persistent_delivery.rb, line 24
    def perform_delivery_persistent(mail)
      deliveries << mail
      File.open(DELIVERIES_PATH,'w') do |f|
        f << Marshal.dump(deliveries)
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.