Last active
December 17, 2015 20:19
-
-
Save ashleygwilliams/5667062 to your computer and use it in GitHub Desktop.
Notes from class, 28 May 2013
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
Classes are blueprints. Objects are known as 'instances' of these classes. | |
Classes are where we define all variables and methods. | |
Instance variables (@var_name) and instance methods (def method_name) belong only to objects and are accessed using dot notation (Object.name) on an object made using 'Class.new'. | |
Class variables (var_name) | |
, constants (VAR_NAME), and class methods (def self.method_name) belong only to the class and are accessed using 'Class::name' | |
To add a new basic route, go to app.rb and add a block that does this: | |
get '/pathname' do | |
erb :view_filename | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
//HOMEWORK