Class: Sortah::Email

Inherits:
Mail
  • Object
show all
Defined in:
lib/sortah/email.rb

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &blk) ⇒ Object



9
10
11
12
# File 'lib/sortah/email.rb', line 9

def method_missing(meth, *args, &blk)
  return @metadata[meth] if has_data_for?(meth)
  super rescue nil
end

Class Method Details

.wrap(context, metadata = {}) ⇒ Object



5
6
7
# File 'lib/sortah/email.rb', line 5

def self.wrap(context,  = {})
  Email.new(context, )
end

Instance Method Details

#metadata(key, value) ⇒ Object



14
15
16
# File 'lib/sortah/email.rb', line 14

def (key, value)
  @metadata[key] = value
end