Created
June 10, 2015 06:13
-
-
Save donigian/7df6893c71f1ce4383a7 to your computer and use it in GitHub Desktop.
Ruby Class
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 User | |
attr_accessor :name, :email | |
def initialize(attributes = {}) | |
@name = attributes[:name] | |
@email = attributes[:email] | |
end | |
def formatted_email | |
"#{@name} <#{@email}>" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment