The Best College Academy of Our Small City

Latest News - QUIS NOSTRUM - Exercitationem ullam corporis suscipit laboriosam

Ruby Scripting

Objective

Knowledge of Ruby to write, modify, maintain and understand Ruby scripts.
The delegate will learn to:
  • Declare variables and initialise them
  • Construct expressions with arithmetic, logical and relational operators
  • Use iterative loops statements
  • Use conditional controls
  • Read/write of files
  • Manipulate text using regex
  • Use and create Ruby Objects
  • Use built-in library functions

Introduction to Ruby

  • What is Ruby
  • What is it used for
  • Installing Ruby?
  • Ruby Basics - objects, regular expressions, arrays, hashes, Object Orientation

Ruby Language Elements

  • Variables and constants
  • Operators
  • Assignments
  • Integer, float and string formats
  • Single and double quotes
  • Here documents
  • Labs

Control Structures

  • Blocks and if statement
  • Boolean and range operators
  • Conditionals - if, unless, case
  • Loops - while, for in, until
  • break, next, retry and redo
  • Labs

Classes and Objects

  • Objects, classes and methods
  • Constructors and attributes
  • Instance and class variables
  • Local and global variables
  • Class and object methods
  • Including external files - load and require
  • Labs

Input and Output in Ruby

  • Opening and closing files
  • Reading from and writing to files
  • Labs

Arrays and Hashes in Ruby

  • Arrays and hashes
  • Building an array
  • The %w shortcut
  • Nesting arrays
  • Hash keys
  • Iiterators
  • Labs

Object Orientation

  • Inheritance
  • Base classes and subclasses
  • What's inherited
  • Overriding
  • Abstract classes
  • Polymorphism
  • Multiple Inheritances
  • Class structure
  • Visibility
  • Labs

Classes and Object Scoping

  • Public, private and protected visibility
  • Singletons and defs
  • Inheritance mixins
  • Destructors and garbage collection
  • Namespaces and modules
  • Hooks
  • Freezing objects
  • Labs

Object Oriented Techniques

  • Clusters of classes
  • Programming and method standards
  • Formal Methods
  • Unified Modelling Language (UML)
  • Views

Strings and Regular Expressions

  • Meta Characters
  • Anchors, literals, character groups and counts
  • Matching in Ruby
  • Modifiers i, o, x and m
  • Pattern matching variables
  • Labs

Special Variables and Pseudo-Variables

  • ARGV and $0
  • Special variables
  • Environment variables
  • Pseudo-variables
  • Reserved words in Ruby
  • Labs

Exceptions

  • begin and end
  • Raise and rescue
  • Throw and catch
  • labs