Created
January 19, 2018 11:21
-
-
Save ilyakrasnov/04ffec9dd30dd72ca723edcea5983149 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Email | |
attr_accessor :subject, :date, :from | |
def initialize(subject, date, from) | |
@subject = subject | |
@date = date | |
@from = from | |
end | |
def print | |
puts "Date: #{date}" | |
puts "From: #{from}" | |
puts "Subject: #{subject}" | |
end | |
end | |
# email = Email.new("Homework this week", "2014-12-01", "Ferdous") | |
# email.print | |
# Date: 2014-12-01 | |
# From: Ferdous | |
# Subject: Homework this week |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment