This file contains hidden or 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 WineGlass | |
attr_accessor :material, :volume, :stem_length | |
def pretty_print_material | |
"Material : #{material}" | |
end | |
def pretty_print_stuff | |
return "This wine glass is cool. It has a stem length of 5 and a volume of 69ml" | |
end | |
end |
This file contains hidden or 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 WineGlass | |
attr_accessor :material, :volume, :stem_length, :wine_volume | |
def pretty_print_material | |
"Happy Dance Party : #{material}" | |
end | |
def pretty_print_stuff | |
"This wine glass is cool. It has a stem length of #{stem_length} and a volume of #{volume}ml" | |
end | |
def pretty_print_everything | |
"My #{material} wine glass, that has a stem length of #{stem_length}, is cool because it holds #{volume}ml" |