镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

01_string_spec.rb - let helper explanation #4

Closed

Description

@CouchofTomato

The explanation of let in the string_spec lesson states it creates a variable that returns the computed value.

It actually creates a helper method with a memoized value that is cached for the same example but not across different examples.

In the example where favorite_color is set to 'navy blue' it is just creating a local variable and isn't related to the helper method created by let.

Activity

  1. added a commit that references this issue on Dec 2, 2021
  2. added a commit that references this issue on Sep 7, 2022
  3. added a commit that references this issue on May 21, 2025
  4. added a commit that references this issue on Jun 16, 2025
  5. added a commit that references this issue on Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions