Last active
March 6, 2019 01:19
-
-
Save anthonygharvey/9ec208fa2faacb28945e86f87a84c95f to your computer and use it in GitHub Desktop.
a `Movie` class with several attributes and functionality to only update a movie’s title if the `in_progress` attribute is `true`
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 Movie | |
attr_accessor :in_progress | |
attr_reader :title, :length, :budget | |
def title=(new_title) | |
if @in_progress | |
@title = new_title | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment