강좌 목록으로 돌아가기
AI035 전문가

프로그래밍 루비: 실용주의 프로그래머의 가이드 (2판)

Ruby 프로그래밍 언어에 대한 포괄적인 참조 및 튜토리얼로, 기본 구문, 객체 지향 설계, 반사 및 스레딩과 같은 고급 기능, 그리고 버전 1.8용 완전한 라이브러리 참조를 다룹니다.

4.9
45.0h
515 학생들
15 lessons
0 좋아요
인공지능
수강 시작하기

강좌 개요

📚 콘텐츠 개요

루비 프로그래밍 언어에 대한 포괄적인 참조 및 튜토리얼로, 기본 구문, 객체 지향 설계, 반사 및 스레딩과 같은 고급 기능을 다루며, 버전 1.8의 완전한 라이브러리 참조를 포함한다.

루비 언어에 대한 결정적 가이드를 통해 우아하고 강력한 프로그래밍의 예술을 익히세요.

저자: 데이브 토머스, 채드 파울러, 앤디 헌트

감사의 말: 루비 메일링 리스트 리뷰어들, 마츠무토 유키히로(마츠), 채드 파울러, 김 윙셋, 그리고 프래그매틱 프로그래머 커뮤니티.

🎯 학습 목표

  1. 이진 파일, 소스 코드 또는 CVS 방법을 사용하여 루비 환경을 설치하고 구성하며, irb 및 ri와 같은 상호작용 도구를 활용한다.
  2. 루비의 이름 규칙과 객체 지향 원칙을 적용하여 메서드를 정의하고 변수를 관리한다.
  3. 기본 배열, 해시, 정규 표현식을 사용하여 데이터를 조작한다.
  4. 단일 상속, super, 믹스인을 사용하여 클래스 계층을 정의하고 구현한다.
  5. 접근 제어(공개, 비공개, 보호)와 속성으로 객체의 가시성과 데이터 무결성을 제어한다.
  6. 유닛 테스트와 통합된 견고한 컨테이너 클래스(예: SongList)를 구축한다.
  7. 다양한 진수(16진수, 8진수, 2진수)를 사용한 숫자 논리와 숫자 반복자를 활용한 제어 흐름을 구현한다.
  8. 인터폴레이션, 헤레독, 다양한 구분자 형식을 사용하여 복잡한 문자열을 구성한다.
  9. 범위를 조건부 로직에서 "전환 스위치"와 구간 검사기로 활용한다.
  10. 스플랫 연산자, 해시 기반 "키워드" 인수, 블록-프로시 전환을 사용하여 유연한 인수 목록으로 메서드를 정의하고 호출한다.

수업

Lesson

This lesson introduces the history and philosophy of the Ruby language while guiding students through setting up a stable development environment on POSIX systems. Students will learn to manage Ruby versions, utilize package managers for dependencies, and execute scripts using standard Shebang notation.

This lesson explores inheritance in Ruby, focusing on how subclasses establish an "is-a" relationship with parent classes to evolve state and behavior. Students will learn to use the super keyword to manage initialization chains and method augmentation while maintaining encapsulation to avoid tight coupling.

This lesson explores Ruby’s scalar data types, focusing on the automatic memory management between Fixnum and Bignum integers and the use of strict conversion methods. Students will also learn to optimize string manipulation and data extraction workflows by constructing complex regular expressions.

AI035: Ch. 6-7: Method Logic and Expression Control (Lesson 4) This lesson explores flexible method definitions in Ruby, focusing on the use of default parameters, the splat operator for argument handling, and expression-based return values. Students will learn how to build adaptive interfaces and utilize parallel assignment to improve code efficiency and readability.

This lesson explores Ruby's exception hierarchy, teaching students how to treat errors as data objects to build more resilient and maintainable applications. You will learn to implement effective error handling by distinguishing between recoverable application errors and fatal system failures while applying modularity principles to improve system stability.

This lesson explores Ruby's stream-based I/O architecture, focusing on how the IO class and Kernel methods provide a unified, bidirectional interface for interacting with files, sockets, and standard streams. Students will learn to effectively manage data flow, utilize standard filters, and apply best practices for input handling and output buffering in Ruby applications.

This lesson explores the principles of reliable Ruby programming through systematic unit testing, debugging, and performance optimization. Students will learn to implement the Test::Unit framework to isolate logic errors, utilize assertions for real-time validation, and apply profiling techniques to improve code efficiency.

This lesson explores the Ruby operational environment, focusing on efficient development workflows through command-line utilities, interactive debugging with IRB, and documentation management using RDoc. Students will learn to leverage Ruby's built-in tools for stream processing, project navigation, and graceful program termination.

This lesson explores the RubyGems ecosystem, focusing on how architectural isolation and runtime path management allow multiple versions of the same library to coexist. Students will learn to resolve dependency trees, manage version constraints, and use RubyGems to prevent version collisions in complex development environments.

This lesson explores the transition from linear terminal scripts to event-driven GUI applications by integrating remote SOAP services into Ruby interfaces. Students will learn to use WSDL dynamic discovery and data sanitization techniques to build responsive, user-friendly dashboards that effectively manage complex, nested data.

This lesson explores how to extend Ruby with C to achieve high-performance execution while maintaining compatibility with Ruby’s object model. Students will learn to use the VALUE type as a bridge between languages, register C functions as Ruby methods, and manage memory safely within the Ruby Garbage Collector.

This lesson explores the structural anatomy of Ruby scripts, focusing on the language's execution lifecycle, reserved keywords, and the use of magic constants like `__FILE__`, `__LINE__`, and `DATA`. Students will learn to implement modular design patterns, such as the `if __FILE__ == $0` execution gate, to create versatile scripts that function as both standalone tools and reusable libraries.

This lesson explores the core philosophy of duck typing and the mechanics of dynamic method dispatch in Ruby. Students will learn how to implement polymorphic interfaces, handle variable arguments, and utilize blocks and the yield mechanism to create flexible, message-driven code.

This lesson explores the internal architecture of Ruby objects, focusing on how the `klass` and `super` pointers facilitate method resolution and inheritance. Students will learn how Ruby decouples instance state from class-based logic and how virtual classes are utilized to manage singleton methods.

This lesson explores Ruby’s reflection and introspection capabilities, teaching students how to dynamically inspect object interfaces, hierarchies, and capabilities at runtime. Participants will learn to implement meta-programming patterns like duck typing and dynamic dispatch while understanding the performance trade-offs of these powerful tools.