Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Practice and Notes

A collection of Ruby programming exercises, practice problems, and learning notes.

Structure

  • /ruby_lesson_notes - Personal notes and concept explanations
  • /pak_test_<number> - Ruby coding exercises, solutions, and associated test files for exercises

Topics Covered

Ruby Fundamentals

  • Data Types and Variables
    • Local, Instance, Class, and Global Variables
    • Constants
  • String Manipulation and Interpolation
  • Arrays and Array Methods
    • Array Shortcuts (%w[])
    • Built-in Methods (push, pop, shift, unshift)
  • Hashes (Objects)
    • Creation and Access
    • Nested Hashes and the dig Method
    • Merging Hashes

Control Flow and Methods

  • Conditional Statements (if/elsif/else, unless)
  • Case Statements
  • Modifier Conditionals
  • Method Definition and Calling
  • Implicit Returns
  • User Input with gets.chomp

Object-Oriented Programming

  • Classes and Objects
  • Instance Methods vs Class Methods
  • The initialize Method (Constructor)
  • Class Variables and Instance Variables
  • Attribute Accessors (attr_reader, attr_writer, attr_accessor)

OOP Design Principles

  • SOLID Principles
    • Single Responsibility Principle (SRP)
    • Open/Closed Principle (OCP)
    • Liskov Substitution Principle (LSP)
    • Interface Segregation Principle (ISP)
    • Dependency Inversion Principle (DIP)
  • Design Patterns
    • Flexible Interfaces
    • Dependency Injection
    • Composition over Inheritance
  • Code Organization
    • Encapsulation
    • Abstraction
    • Inheritance
    • Polymorphism

Blocks, Procs, and Lambdas

  • Block Syntax (do...end and {})
  • Block Parameters and Variables
  • Converting Blocks to Procs
  • Understanding Lambda Behavior
  • Method Parameters with &block

Pattern Matching

  • Regular Expressions Basics
  • The =~ Operator
  • String Pattern Matching

Resources Used

  • Launch School Materials
  • Ruby Documentation
  • Practice Problem Sets

Notes

This repository serves as a personal reference for Ruby programming concepts and practice exercises. Each concept includes comparisons with JavaScript equivalents to aid in understanding.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages