Skip to content

Instantly share code, notes, and snippets.

@ilyakrasnov
Created January 19, 2018 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilyakrasnov/04ffec9dd30dd72ca723edcea5983149 to your computer and use it in GitHub Desktop.
Save ilyakrasnov/04ffec9dd30dd72ca723edcea5983149 to your computer and use it in GitHub Desktop.
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