-
-
Save pyk/8613205 to your computer and use it in GitHub Desktop.
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
## Week 3 Quiz | |
## 1) What does ERB stand for? | |
Embedded Ruby | |
## 2) What is the name of the place (library) where additional built in Ruby functions can be accessed? | |
STDlib | |
## 3) Name 3 Reasons to use Version Control. | |
manage codebase with no painless, versioning codebase with ease, use same codebase within different device | |
## 4) Name one version control software. | |
GIT | |
## 5) What is the output of this Ruby code? | |
arry = ['Harry Potter', 'Hunger Games', 'Cat in the Hat'] | |
arry.each do |x| | |
puts "I enjoy reading #{x}" | |
end | |
=> I enjoy readig Harry Potter | |
=> I enjoy readig Hunger Games | |
=> I enjoy readig Cat in the Hat | |
## 6) What is the output of this ruby code? | |
richard = User.create(:name => 'richard', :movie => 'zoolander') | |
chris = User.create(:name => 'chris', :movie => 'sandlot') | |
ruby = User.create(:name => 'ruby', :movie => 'princess bride') | |
user_array = [richard, ruby, chris] | |
user_array.each do |user| | |
puts "#{user.name} loves watching #{user.movie}" | |
end | |
=> richard loves watching zoolander | |
=> chris loves watching sandlot | |
=> ruby loves watching princess bride | |
### Hint | |
puts chris.name | |
# => 'chris' | |
puts chris.movie | |
# => 'sandlot' | |
## 7) Once we've modified and saved a file that is under version control what 3 steps do we need to get our changes on to our origin server? | |
1. git add | |
2. git commit | |
3. git push origin master | |
## 8) In the exercise we did for homework last week, you entered in a url similar to `http://localhost:8000/index` into your browser. Once the server got the request, explain what needed to happen in order for you to view the web page. | |
load file html.erb with name same as route, index. and then ERB parse that html.erb to pure html. then browser loaded that file | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment