Class: Typedown2Blog::Spec

Inherits:
Object show all
Defined in:
lib/typedown2blog/spec.rb

Class Method Summary collapse

Class Method Details

.delivery_method(m, options = {}) ⇒ Object



43
44
45
46
47
# File 'lib/typedown2blog/spec.rb', line 43

def self.delivery_method m, options= {}
  Mail.defaults do
    delivery_method m, symbolize_keys(options)
  end
end

.glob(v = nil) ⇒ Object



49
50
51
52
53
54
55
# File 'lib/typedown2blog/spec.rb', line 49

def self.glob v = nil
  if v
    @glob = v
  else
    @glob
  end
end

.mail_defaults(&block) ⇒ Object



39
40
41
# File 'lib/typedown2blog/spec.rb', line 39

def self.mail_defaults &block
  Mail.defaults &block
end

.retrieverObject



35
36
37
# File 'lib/typedown2blog/spec.rb', line 35

def self.retriever
  @retriever
end

.retriever_method(method, options = {}, &block) ⇒ Object



28
29
30
31
32
33
# File 'lib/typedown2blog/spec.rb', line 28

def self.retriever_method method, options={}, &block
  @retriever = MailProcessor::Processor.new do
    retriever method, symbolize_keys(options), &block
  end
  @retriever
end

.setup(&block) ⇒ Object



23
24
25
26
# File 'lib/typedown2blog/spec.rb', line 23

def self.setup &block
  instance_eval &block if block_given?
  self
end