Class: Message

Inherits:
AbstractResource
  • Object
show all
Defined in:
app/models/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bccObject

Returns the value of attribute bcc.



7
8
9
# File 'app/models/message.rb', line 7

def bcc
  @bcc
end

#ccObject

Returns the value of attribute cc.



7
8
9
# File 'app/models/message.rb', line 7

def cc
  @cc
end

#fromObject

getters for named headers



20
21
22
# File 'app/models/message.rb', line 20

def from
  @from
end

Instance Method Details

#headers(key) ⇒ Object



9
10
11
# File 'app/models/message.rb', line 9

def headers key
  message_headers.where( name: key).first.value
end

#set_headers(key, val) ⇒ Object



13
14
15
16
17
# File 'app/models/message.rb', line 13

def set_headers key, val
  f=message_headers.where(name: key).first || MessageHeader.new( message: self, key.to_sym => val)
  f.value=val
  f.save
end