Classes in Python allow developers to create reusable components for their code, making it easier to maintain and modify. In this article, we will explore the basics of classes in Python and how to use them effectively in your projects. Basic Principles of Object-Oriented Programming Object-oriented programming (OOP) is a programming paradigm that uses objects and their interactions to design appl
年末年始にスライドを作ろうと思って挫折しました。 RSpec のテストコードは見慣れない "should" なんかが出てきて難しそうに見えますが、実は覚えなきゃいけないのは 4つ程の語彙だけです。*1 Object#should_xxx [args] Object#should_have(n).items Object#should_not_xxx Proc#should_raise() Object#should_xxx [args] 超基本の書き方です。should_ の後に続いたメソッドを呼び出し、その結果が真ならパスします。args で、そのメソッドヘの引数も与えられます。これだけだとイメージし辛いと思いますのでいくつか例を。 "?"は付いても付かなくても OK だったと思います。 1.should_equal 1 Fixnum#equal を呼び出してます。上記の例では下記の判定
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く