In computing, we have boolean values. We expect there to be a true
and there to be a false
.
It lets us do things like this:
a = true
if a == true
Time to practice. I'm going to give you two arrays.
chocolate = ["Ritual",
"Chuao",
"Chocolove",
"Scharffen Berger"]
peanut_butter = ["Peter Pan",
"Skippy",
"Justin's",
Justin: Who is Roy Fielding, baby?
Selena: Some guy. He’s smart.
Justin: Oh? What did he do?
Selena: He helped write the first web servers and then did a ton of research explaining why the web works the way it does. His name is on the specification for the protocol that is used to get pages from servers to your browser.
Justin: How does it work?
* Create a student. | |
* They should have a name. | |
* They should have a house. | |
* They should have a method called #name that prints to screen, "Hello, my name is name and I'm in house" | |
* They should have a method that returns (your choice of spell" | |
* Add a method called get_points that adds a number of points as an argument. | |
* Add a method called points that tells us how many points the student has. |
id | first_name | last_name | phone_number | age | |
---|---|---|---|---|---|
1 | taylor | swift | 5555555 | 25 | |
2 | jeff | wan | 2222222 | 35 | |
3 | luna | lovegood | 3333333 | 17 |
diff --git a/lib/district.rb b/lib/district.rb | |
new file mode 100644 | |
index 0000000..ebe98f8 | |
--- /dev/null | |
+++ b/lib/district.rb | |
@@ -0,0 +1,10 @@ | |
+class District | |
+ attr_reader :name | |
+ | |
+ attr_accessor :enrollment |