Class: MailSandbox::Message
- Inherits:
-
Object
- Object
- MailSandbox::Message
- Defined in:
- lib/mail_sandbox/message.rb
Instance Attribute Summary collapse
-
#completed_at ⇒ Object
Returns the value of attribute completed_at.
-
#data ⇒ Object
Returns the value of attribute data.
-
#password ⇒ Object
Returns the value of attribute password.
-
#recipient ⇒ Object
Returns the value of attribute recipient.
-
#sender ⇒ Object
Returns the value of attribute sender.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize ⇒ Message
constructor
A new instance of Message.
- #to_a ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize ⇒ Message
Returns a new instance of Message.
11 12 13 |
# File 'lib/mail_sandbox/message.rb', line 11 def initialize @data = [] end |
Instance Attribute Details
#completed_at ⇒ Object
Returns the value of attribute completed_at.
6 7 8 |
# File 'lib/mail_sandbox/message.rb', line 6 def completed_at @completed_at end |
#data ⇒ Object
Returns the value of attribute data.
6 7 8 |
# File 'lib/mail_sandbox/message.rb', line 6 def data @data end |
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'lib/mail_sandbox/message.rb', line 6 def password @password end |
#recipient ⇒ Object
Returns the value of attribute recipient.
6 7 8 |
# File 'lib/mail_sandbox/message.rb', line 6 def recipient @recipient end |
#sender ⇒ Object
Returns the value of attribute sender.
6 7 8 |
# File 'lib/mail_sandbox/message.rb', line 6 def sender @sender end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/mail_sandbox/message.rb', line 6 def user @user end |
Instance Method Details
#to_a ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/mail_sandbox/message.rb', line 20 def to_a { :password => password, :user => user, :recipient => recipient, :sender => sender, :completed_at => completed_at, :data => data.join("\r\n"), } end |
#to_json ⇒ Object
15 16 17 |
# File 'lib/mail_sandbox/message.rb', line 15 def to_json to_a.to_json end |