This file contains hidden or 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-US"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> | |
| <title>Hello World!</title> | |
| <!-- Bootstrap core CSS --> | |
| <link href="css/bootstrap.css" rel="stylesheet"> |
This file contains hidden or 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 |
This file contains hidden or 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 |
This file contains hidden or 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 | |
| food_array = [] | |
| 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 hidden or 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
| if (5+5==10) | |
| puts "this is true" | |
| else | |
| puts "this is false" | |
| end |
This file contains hidden or 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
| # puts "helo" | |
| def greeting | |
| puts "Please enter your name:" | |
| name = gets.chomp | |
| puts "Hello" + " " + name | |
| end | |
| greeting |
This file contains hidden or 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-US"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Hello World!</title> | |
| <!-- jQuery is required for Bootstrap to work --> | |
| <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> | |
| <!-- Bootstrap core CSS --> | |
| <link href="css/bootstrap.css" rel="stylesheet"> |
This file contains hidden or 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-US"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Hello World!</title> | |
| <!-- jQuery is required for Bootstrap to work --> | |
| <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> | |
| <!-- Bootstrap core CSS --> | |
| <link href="css/bootstrap.css" rel="stylesheet"> |
This file contains hidden or 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-US"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Hello World!</title> | |
| <!-- jQuery is required for Bootstrap to work --> | |
| <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> | |
| <!-- Bootstrap core CSS --> | |
| <link href="css/bootstrap.css" rel="stylesheet"> |
This file contains hidden or 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-US"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Contact</title> | |
| <!-- Bootstrap core CSS --> | |
| <link href="css/bootstrap.css" rel="stylesheet"> |
NewerOlder