Ruby (Part 4 of 6): Conditionals and Blocks
Interactive

Ruby (Part 4 of 6): Conditionals and Blocks

Biz Library
Updated Feb 04, 2020

In this course, Ruby expert Jordan Hudgens dives into the topics of conditionals and blocks by exploring the various mechanisms for implementing this type of behavior into an application. He will discuss working with both standard and nested conditionals as well as give a step-by-step guide for using switch statements. Additionally, Hudgens will take a comprehensive look at blocks, giving a step-by-step demonstration on how they are used including reviewing how popular frameworks use them.


Lesson 1:

  • Standard
  • Demo: Standard Conditional.

Lesson 2:

  • Compound
  • Demo: Compound Conditional
  • Demo: Conditional Order.

Lesson 3:

  • Conditional Operators
  • Demo: Conditional Operators.

Lesson 4:

  • Switch Statements
  • Demo: Switch Statement.

Lesson 5:

  • Guard Clauses
  • Demo: Guard Clause.

Lesson 6:

  • What Are Blocks?
  • Demo: Blocks.

Lesson 7:

  • Yield
  • Demo: Yield.

Lesson 8:

  • block_given?
  • Demo: block_given?
  • Demo: Practical Example.

Lesson 9:

  • File Class with Block
  • Demo: File Class.

Lesson 10:

  • Yield in Rails
  • Demo: Yield in Rails.

Lesson 11:

  • Ampersand Argument
  • Demo: Ampersand.