Created
June 22, 2018 22:27
-
-
Save Brandongoodman615/cf14ef4a9891fa1e9ef673d48daa975f to your computer and use it in GitHub Desktop.
Quiz #3 Build a 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 Bicycle | |
attr_accessor :brand, :weight | |
def initialize(brand, weight) | |
@brand = brand | |
@weight = weight | |
end | |
def output_bicycle | |
puts "#{@weight} lb, #{@brand} bicycle" | |
end | |
end | |
bicycle = Bicycle.new(:huffy, 15) | |
bicycle.output_bicycle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment