Download presentation
Presentation is loading. Please wait.
1
Ruby Demo Code Guide to filenames
2
Ruby Basics Filename Topic RubyBasics Expressions, strings, etc.
3
Ruby Day 2 Filename Topic RubyDataTypes Arrays, Hashes etc.
RubyExpressions Methods, Assignment, Splat, etc. RubyUnitTest Unit Test framework RubyControlFlow Standard control flow, yield *filename extension is .rb
4
Ruby Classes Filename Topic RubyClasses-1 Simple Cat class
Bottle with overloaded operators RubyClasses-3 Duck typing RubyClasses-4 Object equality RubyClasses-5 Type-safe methods RubyClasses-6 Overloading [] and each, review yield RubyClasses-7 Object comparisons, hash code RubyClasses-8 Class methods and variables *filename extension is .rb
5
Ruby Inheritance Filename Topic RubyInheritance-1
Simple Person/Student inheritance RubyInheritance-1a Show instance vars NOT inherited RubyInheritance-2 Override inherited methods RubyInheritance-2a Method visibility RubyInheritance-3 Abstract classes RubyInheritance-4 Chaining methods (super) RubyInheritance-5 Class variables
6
Ruby Modules and Open Class
Filename Topic RubyModules Simple module to encode/decode RubyModules-2 Shows mixin (flying creature) RubyOpenClasses-1 Simple Cat class RubyOpenClasses-2 Add a method to the Cat class RubySingleton Person singleton method RubyLSP LSP example (mathn)
7
Ruby Regular Expressions
Filename Topic RubyRegex Regular expressions
8
Ruby Reflection Filename Topic RubyReflection-1
Show methods/vars of Cat RubyReflection-2 Message framework
9
Ruby Megaprogramming Filename Topic RubyMetaprogramming
How to write attr accessors RubyMetaprogramming-2 questions.qm Data for quiz program questionsv1.rb Just load data, getting started quiz.rb Stores questions and answers Question (in quiz.rb) Contains one question (w answers) Answer (in quiz.rb) Contains one answer (right/wrong) questions_test.rb Unit test to ensure questions load OK
10
Ruby Methods/Procs Filename Topic RubyMethodArgs
Shows 3 ways to pass arguments RubyYield Fibonacci using yield RubyProc-1 Generate # sequences using blocks, procs RubyProc-2 Uses eval, instance_eval RubyProc-3 Call an instance method
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.