Screencast Ruby Idioms Ruby

  • Caike

Locked Content

A subscription is required for viewing this video. Enroll now to get full access to all Code School courses and content.

Enroll Now Sign in


  1. Pedro Assumpção said

    Cool presentation, tks Caike.

  2. Alex Braha Stoll said

    Interesting idiom, I will try it later! However, I still feel it is better to stick with initialize (only because it is the convention and I don't think there are lots of advantages in using the Struct idiom).

  3. Daniel Gerep said

    Where are the pitfalls? Abraço!

  4. dmitrykharlamov said

    Inherit initialize from Struct? Neat

  5. will barker said

    Nice. I remember this stuff being tricky in Ruby bits II. Helps to take a new look at it.

  6. azrad said

    Never use Struct before, good tutorial and helps me understand more.

  7. hacktorious said

    Short and Sweet!

  8. SpaceShip Dev said

    One day this will click, but for now I'M PULLING MY HAIR OUT #thatisall

  9. Mitch said

    This is clever and enlightening. Well done.

  10. mwallisch said

    Still new to ruby so maybe I'm missing something... It looks really neat but taking away a classes possibility of inheritance just to save a few lines of code? I don't know, doesn't feel right in terms of flexibilty. Apart from that: very good video!

  11. Jonathan Ruiz said

    That was awesome Caike, Thanks!

  12. Rahul Jayaraman said

    Awesome! Would love to see more complex Ruby stuff. I liked the duration as well.

  13. Andy Zhang said

    Very clever and compact - I like it!

About This Screencast

Learn how to use Ruby Structs as class constructors in Ruby. We'll review the benefits and the potential pitfalls of this approach.

You need to be an enrolled student in order to view this video and subscribe.

Enroll Now