This article is a Private article. Only a writer and users who know the URL can access it.
Please change open range to public in publish setting if you want to share this article with other users.

More than 1 year has passed since last update.

d8_d10_refactoring_tsutaya 11/16, 11/30, 12/7 :: refactoring

Posted at

リンク

動画の最後のところで,rspec spec/final_specが通らずに終わっていますが,それは,

# in movie.rb
class Movie

  def initialize(title, the_price_code)
#    @title, self.price_code = title, the_price_code #before
        @title, @price = title, the_price_code #after
  end
end

と修正する必要がありました.最後に,@priceをattr_accessorに変更して@priceをaccessできるようにしたので,その初期化をここで行うように修正するべきでした.

このほかにも動画の中で,何箇所かテキストのtypoerrorを口頭で修正しています.誰か,書き出してくれると嬉しいんですが...

講義内容

課題

  • 自分のdirectoryにd8_refactoringを作り,tsutayaのrspecが通るように修正せよ.
  • Refactoring Tsutaya に従ってrefactoringせよ.
  • state patternについて解説せよ.

  • source ~/Desktop/lecture_22f/multi_scale_22_text/d8_10_refactoring_tsutaya/README.org
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up