Class: Message
- Inherits:
-
AbstractResource
- Object
- AbstractResource
- Message
- Defined in:
- app/models/message.rb
Instance Attribute Summary collapse
-
#bcc ⇒ Object
Returns the value of attribute bcc.
-
#cc ⇒ Object
Returns the value of attribute cc.
-
#from ⇒ Object
getters for named headers.
Instance Method Summary collapse
Instance Attribute Details
#bcc ⇒ Object
Returns the value of attribute bcc.
7 8 9 |
# File 'app/models/message.rb', line 7 def bcc @bcc end |
#cc ⇒ Object
Returns the value of attribute cc.
7 8 9 |
# File 'app/models/message.rb', line 7 def cc @cc end |
#from ⇒ Object
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 .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=.where(name: key).first || MessageHeader.new( message: self, key.to_sym => val) f.value=val f.save end |