Ruby Blocks, Procs, and Lambdas 🦁🐅🐻

Поділитися
Вставка
  • Опубліковано 15 жов 2024

КОМЕНТАРІ • 52

  • @ahmedabdelaalweb
    @ahmedabdelaalweb 3 роки тому +18

    I've tried to understand these terms for a long time, and every time I walked away feeling like I get it but I can't put my finger on what's missing. You helped me fully understand them and made it very easy to follow. Thank you very much! I'm truly grateful.

    • @cjav_dev
      @cjav_dev  3 роки тому +4

      So happy to hear that!! Thanks for watching

  • @willyhorizont8672
    @willyhorizont8672 11 місяців тому +2

    I'm just learning ruby. Your explanation of block, proc, and lambda is very easy to understand. Thank You!

  • @marcioiherrero
    @marcioiherrero 2 місяці тому +1

    Very good, now I understand perfectly how it works by passing a block as
    a parameter and how it works with parameter in block.
    The example of the each method illustrated this functionality well,
    I was wondering how each of the Array and Hash worked behind the scenes.
    Thank you!

  • @allicernoch
    @allicernoch 2 роки тому +2

    Just pulled up this video to learn about procs and was like "Hey, I know him!" We sat at a table together during lunch at RailsConf. Excited to watch more of your videos, this one was great!

    • @cjav_dev
      @cjav_dev  2 роки тому

      Hey! Thanks for watching! Great meeting you at RailsConf. Looking forward to rubyconf already :)

  • @idreesibrahim5642
    @idreesibrahim5642 2 роки тому

    love you boy! great concept you shared. Thanks.

  • @c_zeroyt2556
    @c_zeroyt2556 2 роки тому +1

    I read so many articles and blogs about procs and lamdas but now I understand fully, thanks.

  • @yashsanghavi5338
    @yashsanghavi5338 3 роки тому +1

    I think this is best video on UA-cam for understanding blocks, procs and lambdas

  • @Andy_a7
    @Andy_a7 2 роки тому +1

    the best explanation of how you implement in Ruby the thing known as a "callback function" in JavaScript.

  • @ES11777
    @ES11777 Рік тому

    Awesome vid, bro! I'm The Odin Project student and your video helped me understand procs! Thank you, keep up the good work!

  • @Rarasinhoo
    @Rarasinhoo Рік тому +1

    wow man, you have sooo much ruby knowledge it's overwhelming

    • @cjav_dev
      @cjav_dev  Рік тому

      I’ve got time on my side. Anyone can do it!

  • @actrox1
    @actrox1 Рік тому

    It's my first time using Ruby and the way you are explaining it, I see everything looks clear.

  • @SCBiscuit13
    @SCBiscuit13 3 місяці тому

    I think there is an issue here. When you are trying to pass a lambda to the 'each' method. The '&' symbol is converting the lambda into the proc on passing vars to the method.

  • @juliantoro8416
    @juliantoro8416 2 роки тому

    Thanks for the explanation, you explain things very easily

    • @cjav_dev
      @cjav_dev  2 роки тому

      Thanks for the kind words! Glad you liked it.

  • @TheLastLogicalOne
    @TheLastLogicalOne Рік тому

    Thank you, very helpful.

  • @Ralph_Schumacher
    @Ralph_Schumacher 2 роки тому

    Great explained, THANKS!

  • @shanmugam_m
    @shanmugam_m 3 роки тому +2

    Thanks for making this video. Need more videos about Ruby on Rails!

    • @cjav_dev
      @cjav_dev  3 роки тому +1

      Any rails topics in particular you’d like to see?

    • @shanmugam_m
      @shanmugam_m 3 роки тому +3

      ​@@cjav_dev Rails API Request Specs with RSpec for both controller and model. Thanks in advance

    • @cjav_dev
      @cjav_dev  3 роки тому +1

      @@shanmugam_m ooh good one. Will do some rspec content soon :)

    • @shanmugam_m
      @shanmugam_m 3 роки тому +1

      @@cjav_dev wow waiting!

  • @abdu5822
    @abdu5822 Рік тому

    Thanks for this. Great explanations.

  • @cppdog3549
    @cppdog3549 Рік тому +1

    Just amazing. Love this tutorial. It's very clear, and the examples are awesome. Thank you for taking the time and creating this video and helping educate us. Warm thank you from Erbil, Iraq. You should visit by the way, we would love to have you here. My house is open for you 24/7.

    • @cjav_dev
      @cjav_dev  Рік тому

      Thanks for watching and thanks for your generosity:)

  • @adan9975
    @adan9975 2 роки тому

    Extra super mega cool block, lambda and proc common uses case. Thanks yo 💪🏻💪🏻💪🏻💪🏻

  • @ClaudineyPerbony
    @ClaudineyPerbony 3 роки тому +1

    great explanation. simple and concise. thanksssss again!

  • @PervadingPower
    @PervadingPower 2 роки тому

    Thank you! It's useful and interesting!🖖

  • @rachelleggett1634
    @rachelleggett1634 3 роки тому +2

    This was really helpful, thank you!

  • @Amd107
    @Amd107 9 місяців тому

    This is an amazing tutorial!

  • @dencam
    @dencam Рік тому +1

    Missing your Rails tutorials

  • @tahamanna3600
    @tahamanna3600 7 місяців тому

    Great video, thanks!

  • @emilianomazzaglia7300
    @emilianomazzaglia7300 3 роки тому +1

    A little comment when you explain the return behavior of procs, procs returns from the context that it was call, so it will return the each execution :D
    Everything else was really good!

  • @oiojin831
    @oiojin831 3 роки тому

    thanks for the video,
    how can you call each method with block ??
    each(students) do ...
    dont your block has to be iside of the parenthesis?

  • @larrydanso1129
    @larrydanso1129 3 роки тому

    Thanks for making this simple to understand

  • @ladmanoj1435
    @ladmanoj1435 3 роки тому

    Awesome. Thank you for the video. :)

  • @YasserKavousi
    @YasserKavousi 2 роки тому

    great, that was helpful!

  • @aarya9382
    @aarya9382 2 роки тому

    At 14:30, proc did return the last statement, however, puts returns nil so that’s why the output was like that

  • @FaraazAhmad
    @FaraazAhmad 2 роки тому

    Bit out of context but are those 4 names related to DC/Marvel heroes by any chance? :)

    • @cjav_dev
      @cjav_dev  2 роки тому

      Yep haha good catch

  • @developerfoe
    @developerfoe 2 роки тому

    masterpiece...

  • @aualdrich
    @aualdrich 3 роки тому +3

    Great explanation! Long time rubyist but I've never used/properly understood procs and lambdas like I should have. This helped a lot. Thanks!

    • @cjav_dev
      @cjav_dev  3 роки тому

      Awesome! Thanks for watching!

  • @bradalza98
    @bradalza98 3 роки тому

    Please make a video on self, it's very confusing.

  • @dencam
    @dencam Рік тому

    This is metaprogramming, right?

    • @cjav_dev
      @cjav_dev  Рік тому

      I’ve got another episode about meta programming. This one is more about understanding blocks.

  • @shashankkestwal4454
    @shashankkestwal4454 3 місяці тому

    Please tell me that Rails will not die in the next 5 years.

  • @TheFranciscomoral
    @TheFranciscomoral 3 роки тому

    still trying to understand the last one :(

    • @cjav_dev
      @cjav_dev  3 роки тому

      Lambdas?

    • @TheFranciscomoral
      @TheFranciscomoral 3 роки тому

      @@cjav_dev tks for answering ! No , the logic inside the block to return the values ordered by how much times they appear in the array