Day 18

Today saw a lot of new stuff. I feel like a ton of stuff was introduced and not gone over very deeply but deep enough for me to understand and implement it. In 11 lessons and labs I was exposed to super and how to use it, mass assignments, creating and implementing custom errors, gems, bundler, and basic scraping with Nokogiri. I can tell I was exposed to many things in preparation for the first projects, which can’t get here fast enough! At least I say that now, we’ll see how I feel when I’m at a complete stand still and stuck on one of them lol.

Today I got stuck for a little while utilizing super. I had a lab with a parent class with a method that simply puts "I can't remember what it was exactly." and in the child class I was suppose to use super to have that phrase repeated 10 times. So my initial attempt, inside the method was: super.10.times as I figured I could just call this method but I got NoMethodError: undefined method `super' for #<Enumerator: 10:times>. Hmmm. I did some searching and even called super.class in pry but couldn’t get anymore info. BTW, super.class literally gave me nothing but a new line in pry to look at, or was that actually something??? So I posed the quesiton in the Slack channel for those who are enrolled in the bootcamp. After a side chain of responses with back and forth I got what I needed for my understanding

super yields the implementation from the method it’s overriding and returns the last return value or it just returns the last return value.
Yianna (thanks!)

This is what I needed. Since it’s returning the last value and super was just a simple puts method the return value was nil. No wonder I couldn’t make method calls on it. I also got some way more in depth info that I haven’t had a chance to digest yet. I didn’t want to get stuck on it when I knew just typing out super ten times would pass the lab. In fact, that’s how Flatiron’s solution was coded. This lab was more about understanding how super works than how to call methods on it.

Other than that it was just A LOT of information as I stated at the beginning. Also a chuckle when I found out that ~> is affectionately called a “twiddle-wakka” for whatever reason. I can figure out the twiddle part but the wakka is stumping me right now. If you know please comment and inform me.

I have a few video reviews and then I start projects!!!

Time spent today: 3:16
Time spent total: 79:20
Lessons completed today: 11
Lessons completed total: 279