Skip to content

jaimejohnsen/oo-email-parser-v-000

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object Oriented Email Parser

Objectives

  1. Practice defining a class and using an attr_accessor to create setter and getter methods
  2. Use TDD to write working code

Description

You will be writing an EmailParser class that gets initialized with a string of emails.

Your job is to parse those emails into a useful array using an instance method, parse.

I should be able to do this:

emails = "[email protected], [email protected]"
parser = EmailParser.new(emails)

parser.parse
# => ["[email protected]", "[email protected]"]

You should be able to initialize with a list of emails either separated with spaces or separated with commas. The parse method should, additionally, only return unique emails.

Instructions

This lab is test-driven, so run the test suite to get started and use the test output to get the program working.

Hints:

  • How will you control for parsing a list of emails that is either comma separated or separated by a white space.
  • Use an attr_accessor to set and get the list of emails

View Object Oriented Email Parser on Learn.co and start learning to code for free.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%