<commit_before># Introduction

## Instance Variables

Objects can hold their own state by setting _instance variables_.
These variables live within an object are normally used to store some internal state.

Instance variables always start with an `@`.
You can create a new instance variable by setting a variable starting with an `@`.
For example:

```ruby
class Repeater
  def hear(something)
    # Save what's been heard into a new instance variable called @heard
    @heard = something
  end

  def repeat
    # Outputs the value of the instance variable
    print @name
  end
end

repeater = Repeater.new
repeater.hear("<NAME>!")
repeater.repeat # Prints "Hello, friend!"
```

Objects usually set their initial state in an `initialize` method, which is automatically called when calling `new` on a class.<commit_msg>Update introduction for amusement-park exercise<commit_after># Introduction

## Instance Variables

Objects can hold their own state by setting _instance variables_.
These variables live within an object are normally used to store some internal state.

Instance variables always start with an `@`.
You can create a new instance variable by setting a variable starting with an `@`.
For example:

```ruby
class Repeater
  def hear(something)
    # Save what's been heard into a new instance variable called @heard
    @heard = something
  end

  def repeat
    # Outputs the value of the instance variable
    print @heard
  end
end

repeater = Repeater.new
repeater.hear("<NAME>!")
repeater.repeat # Prints "Hello, friend!"
```

Objects usually set their initial state in an `initialize` method, which is automatically called when calling `new` on a class.
{'fraction_non_alphanumeric': 0.06507462686567164, 'fraction_numerical': 0.0, 'mean_word_length': 4.270440251572327, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2399027', 'n_tokens_mistral': 446, 'n_tokens_neox': 429, 'n_words': 221}