Ruby / Foundations: values, methods, text, and valid objects

Ruby β€” Foundations: values, methods, text, and valid objects

Develop precise object-reference, truthiness, method, parsing, collection, and construction reasoning.

6 lessons Β· No account required

What you will learn

  • Distinguish present values, missing data, mutation, and the result each method promises.
  1. Understand Ruby objects, bindings, and numeric meaning

    Read small scripts through object references, dynamic values, integer division, mutable aliases, and shallow freezing.

    Start learning
  2. Write conditions using Ruby truthiness and expression results

    Use explicit predicates, if and case results, bounded iteration, and clear Boolean precedence for archive rules.

    Start learning
  3. Design method, keyword, and block contracts

    Use explicit parameter roles, implicit returns, keyword forwarding, yield, and mutation conventions without hidden assumptions.

    Start learning
  4. Handle text, encodings, and numeric conversion deliberately

    Distinguish mutation, no-change bang results, bytes, characters, whole-string matching, and strict versus permissive parsing.

    Start learning
  5. Use arrays and hashes without hiding missing data

    Choose positional or key lookup, fetch semantics, symbol/string keys, independent defaults, and deliberate shallow copies.

    Start learning
  6. Construct valid objects and control their public surface

    Use initialize, instance variables, readers, validated operations, private helpers, and namespaces without promising security from visibility.

    Start learning
Back to course