- Debugging Philosophy and Techniques
- Basic Errors and Reading an Exception
- Methods and the Stack, Reading a Backtrace
- Error Classes, Raising and Rescuing
- More Debugging Techniques, a Glimpse of Testing
##BDD - Behavior Driven Development #Learing Objectives:
- Understand how to make list of attributes and behaviors
###Quick review:
- What's an object, what's a class?
Classes are a little bit like templates. Usually, you create an instance of a class - an object. Object methods get the job done, for example blend a smoothie.
Sometimes classes have methods too, that means classes can do things without the need to create an object. But for sake of simplicity, let's say we always want to create an instance of a class, an object.
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
| require 'sinatra' | |
| require 'sinatra/reloader' | |
| get "/:operator/*" do | |
| operator = params[:operator].to_s | |
| n = params[:splat][0].split('/') | |
| n.map!{ |e| e.to_f } | |
| case operator | |
| when "add" |
Go to http://getbootstrap.com and download the dist folder.
- Navigate to the
dist/css/bootstrap.min.cssfile. - Copy and paste it into your app folder under
/public/stylesheets/bootstrap.min.css.
Let's create our own responsive grid example. Go to the index
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
| # app/controllers/site_controller.rb | |
| class SiteController < ApplicationController | |
| def index | |
| end | |
| def contact | |
| end | |