Artwork

Andrew Mason and Julie J에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 Andrew Mason and Julie J 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.
Player FM -팟 캐스트 앱
Player FM 앱으로 오프라인으로 전환하세요!

Favorite Ruby Methods: Part 4 - Enumerables + Bonus Methods

37:58
 
공유
 

Fetch error

Hmmm there seems to be a problem fetching this series right now. Last successful fetch was on June 06, 2024 13:47 (1+ y ago)

What now? This series will be checked again in the next day. If you believe it should be working, please verify the publisher's feed link below is valid and includes actual episode links. You can contact support to request the feed be immediately fetched.

Manage episode 356165331 series 3375882
Andrew Mason and Julie J에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 Andrew Mason and Julie J 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.

On this episode of Ruby for All, Julie tells us she’s fostering a seven week old puppy and having lots of fun, and Andrew reveals he would love to get a dog in the future. Also, it’s the end of the month and you know what that means? Andrew and Julie are wrapping up their February series on Ruby Methods, so first up, they’ll be discussing the module Enumerable since Andrew learned more about it, we’ll find out about polymorphic record, and then on to the object methods tally, partition, sort by, send, is_a, itself, respond_to, .methods, .tap, strftime, and integer.digits. Thanks for joining us on this journey and we hope you enjoyed this series as much as we did! Download this episode now to hear more!

[00:01:15] Julie and Andrew share how they both felt about this series, and how they love all the support they’ve been getting from the listeners.

[00:03:10] Andrew kicks things off with explaining module Enumerable since he couldn’t explain what it was the other week, he has since learned about it, and now you can too.

[00:05:00] Aside from array and hash, Julie wonders if there are other objects that might pull the enumerable in, like set?

[00:07:32] Julie explains the object method tally, which returns a hash containing the counts of equal elements, and we hear some examples.

[00:08:52] What is a polymorphic record?

[00:10:37] Andrew tells us why he likes flat map, and Julie shares it’s very readable and when she learned to use it

[00:13:01] Our next object method is partition, which Julie explains she hasn’t had a chance to use it in practice, and we hear what it does.

[00:15:30] The next object method is sort by, with a block given, returns an array of elements of self, sorted according to the value returned by the block for each element. The ordering of equal elements is indeterminate and may be unstable.

[00:17:29] Andrew likes the next object method send, which invokes the method identified by symbol, passing it any arguments specified. When the method is identified by a string, the string is converted to a symbol. Andrew explains this one in depth.

[00:22:33] The next object method is called is_ a, also an alias for kind of, which returns true if class is the class of object.

[00:24:45] Julie put the next object method on the list and Andrew didn’t even know about it! The next object method is itself, which returns the receiver. If anyone knows how to use itself in practice, please let Julie and Andrew know.

[00:25:52] The next object method is respond_to, and when you should use this.

[00:27:43] The next object method is .methods, that returns a list of all the methods that are available to that object, and Andrew uses this for debugging.

[00:29:28] Coming up now is the object method .tap, which yields self to the block, and then returns self. The primary purpose of this method is to “tap into” a method chain in order to perform operations on intermediate results within the chain. Julie asks Andrew to explain what strong parameters are and what tap does.

[00:33:05] Julie’s been using this next object method called strftime, which formats time according to the directives in the given format string. She shares a great resource she used to build, Andrew tells us that Rails has formatted strings, and a website made by Andy Croll.

[00:36:45] We made it to the last object method which is integer.digits, and this returns an array of integers representing that number.

Panelists:

Andrew Mason

Julie J.

Sponsors:

Avo

Honeybadger

Links:

Andrew Mason Twitter

Andrew Mason Website

Julie J. Twitter

Julie J. Website

module Enumerable

tally

flat map

partition

sort by

send

is_a

itself

respond to

.methods

.tap

strftime

integer digits

FOR A GOOD STRFTIME

Rails DateTime Formats

  continue reading

69 에피소드

Artwork
icon공유
 

Fetch error

Hmmm there seems to be a problem fetching this series right now. Last successful fetch was on June 06, 2024 13:47 (1+ y ago)

What now? This series will be checked again in the next day. If you believe it should be working, please verify the publisher's feed link below is valid and includes actual episode links. You can contact support to request the feed be immediately fetched.

Manage episode 356165331 series 3375882
Andrew Mason and Julie J에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 Andrew Mason and Julie J 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.

On this episode of Ruby for All, Julie tells us she’s fostering a seven week old puppy and having lots of fun, and Andrew reveals he would love to get a dog in the future. Also, it’s the end of the month and you know what that means? Andrew and Julie are wrapping up their February series on Ruby Methods, so first up, they’ll be discussing the module Enumerable since Andrew learned more about it, we’ll find out about polymorphic record, and then on to the object methods tally, partition, sort by, send, is_a, itself, respond_to, .methods, .tap, strftime, and integer.digits. Thanks for joining us on this journey and we hope you enjoyed this series as much as we did! Download this episode now to hear more!

[00:01:15] Julie and Andrew share how they both felt about this series, and how they love all the support they’ve been getting from the listeners.

[00:03:10] Andrew kicks things off with explaining module Enumerable since he couldn’t explain what it was the other week, he has since learned about it, and now you can too.

[00:05:00] Aside from array and hash, Julie wonders if there are other objects that might pull the enumerable in, like set?

[00:07:32] Julie explains the object method tally, which returns a hash containing the counts of equal elements, and we hear some examples.

[00:08:52] What is a polymorphic record?

[00:10:37] Andrew tells us why he likes flat map, and Julie shares it’s very readable and when she learned to use it

[00:13:01] Our next object method is partition, which Julie explains she hasn’t had a chance to use it in practice, and we hear what it does.

[00:15:30] The next object method is sort by, with a block given, returns an array of elements of self, sorted according to the value returned by the block for each element. The ordering of equal elements is indeterminate and may be unstable.

[00:17:29] Andrew likes the next object method send, which invokes the method identified by symbol, passing it any arguments specified. When the method is identified by a string, the string is converted to a symbol. Andrew explains this one in depth.

[00:22:33] The next object method is called is_ a, also an alias for kind of, which returns true if class is the class of object.

[00:24:45] Julie put the next object method on the list and Andrew didn’t even know about it! The next object method is itself, which returns the receiver. If anyone knows how to use itself in practice, please let Julie and Andrew know.

[00:25:52] The next object method is respond_to, and when you should use this.

[00:27:43] The next object method is .methods, that returns a list of all the methods that are available to that object, and Andrew uses this for debugging.

[00:29:28] Coming up now is the object method .tap, which yields self to the block, and then returns self. The primary purpose of this method is to “tap into” a method chain in order to perform operations on intermediate results within the chain. Julie asks Andrew to explain what strong parameters are and what tap does.

[00:33:05] Julie’s been using this next object method called strftime, which formats time according to the directives in the given format string. She shares a great resource she used to build, Andrew tells us that Rails has formatted strings, and a website made by Andy Croll.

[00:36:45] We made it to the last object method which is integer.digits, and this returns an array of integers representing that number.

Panelists:

Andrew Mason

Julie J.

Sponsors:

Avo

Honeybadger

Links:

Andrew Mason Twitter

Andrew Mason Website

Julie J. Twitter

Julie J. Website

module Enumerable

tally

flat map

partition

sort by

send

is_a

itself

respond to

.methods

.tap

strftime

integer digits

FOR A GOOD STRFTIME

Rails DateTime Formats

  continue reading

69 에피소드

كل الحلقات

×
 
Loading …

플레이어 FM에 오신것을 환영합니다!

플레이어 FM은 웹에서 고품질 팟캐스트를 검색하여 지금 바로 즐길 수 있도록 합니다. 최고의 팟캐스트 앱이며 Android, iPhone 및 웹에서도 작동합니다. 장치 간 구독 동기화를 위해 가입하세요.

 

빠른 참조 가이드

탐색하는 동안 이 프로그램을 들어보세요.
재생