This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Pet | |
attr_reader :color, :breed | |
attr_accessor :name | |
def initialize(color, breed) | |
@color = color | |
@breed = breed | |
@hungry = true | |
end | |
def feed(food) | |
puts "Mmmm, " + food + "!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Pet | |
attr_reader :color, :breed | |
attr_accessor :name | |
def initialize(color, breed) | |
@color = color | |
@breed = breed | |
@hungry = true | |
end | |
def feed(food) | |
puts "Mmmm, " + food + "!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cat | |
attr_reader :color, :breed | |
attr_accessor :name | |
def initialize(color, breed) | |
@color = color | |
@breed = breed | |
@hungry = true | |
end | |
def feed(food) | |
puts "Mmmm, " + food + "!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def greeting | |
if 5 + 5 == 10 | |
puts "this is true" | |
else | |
puts "this is false" | |
end | |
end | |
greeting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fav_foods | |
# code for this method goes in here | |
food_array = Array.new | |
3.times do | |
puts "Name a favorite food." | |
food_array << gets.chomp | |
end | |
p food_array | |
puts "Your favorite foods are #{food_array.join(", ")}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Margaritra Itaj</title> | |
<meta charset=utf-"8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Latest compiled and minified Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Margaritra Itaj</title> | |
<meta charset=utf-"8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Latest compiled and minified Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Margaritra Itaj</title> | |
<meta charset=utf-"8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Latest compiled and minified Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Margaritra Itaj</title> | |
<meta charset=utf-"8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Latest compiled and minified Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Margaritra Itaj</title> | |
<meta charset=utf-"8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Latest compiled and minified Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> |
NewerOlder