# Meowing Cat

## Meowing Cat

### Objectives

1. Practice defining a class
2. Use macros to create setter and getter methods

[![maru in a box](https://camo.githubusercontent.com/e1bdda13405870d2341caa881fb767ba9b585ac1/687474703a2f2f726561646d652d706963732e73332e616d617a6f6e6177732e636f6d2f74756d626c725f6c6d3834316d6a45647a317169627870346f315f3530302e6a7067)](https://camo.githubusercontent.com/e1bdda13405870d2341caa881fb767ba9b585ac1/687474703a2f2f726561646d652d706963732e73332e616d617a6f6e6177732e636f6d2f74756d626c725f6c6d3834316d6a45647a317169627870346f315f3530302e6a7067)

### Introduction

In this lab, you'll be creating a Cat class. Every instance of a Cat should have a name and be able to meow. In other words, I should be able to do:

```
maru = Cat.new
maru.name = "Maru"

maru.name
# => "Maru"

maru.meow
# "meow!"
# => nil
```

### Instructions

Run the test suite to get started. You'll be writing all your code in the `lib/meowing_cat.rb` file.

1. Define a class, called Cat.
2. Use the `attr_accessor` macro to create a setter and getter method for a cat's name.
3. Write a method, `.meow`, that outputs "meow!" to the terminal using the `puts` method when called on an instance of Cat.

View [Meowing Cat](https://github.com/learn-co-curriculum/oo-meowing-cat) on Learn.co and start learning to code for free.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://certil-remy.gitbook.io/learn/oop-ruby/untitled-4.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
