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
> load 'dog.rb' | |
> bob = Dog.new("Bob", "Medium") | |
> bob.name |
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
> load 'dog.rb' | |
> floyd = Dog.new | |
> floyd.bark | |
> floyd.walk |
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
> ralph.send(:bark) |
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
> ralph.class |
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 ralph.bark | |
?> "Ruff!" | |
> end | |
> ralph.bark |
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
> ralph.bark |
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
<h3>New Todo Item:</h3> | |
<%= render 'form' %> | |
<h5>All Todos</h5> | |
<table> | |
<thead> | |
<tr> | |
<th>Title</th> | |
<th colspan="3"></th> | |
</tr> | |
</thead> |
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
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.1.1' | |
# Use sqlite3 as the database for Active Record | |
gem 'sqlite3', group: :development | |
gem 'pg', group: :production | |
# Use SCSS for stylesheets | |
gem 'sass-rails', '~> 4.0.3' |
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 Todo < ActiveRecord::Base | |
def hours_since_created | |
((Time.now - created_at) / 1.hour).round | |
end | |
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
<h3>New Todo Item:</h3> | |
<%= render 'form' %> | |
<h5>All Todos</h5> | |
<table> | |
<thead> | |
<tr> | |
<th>Title</th> | |
<th colspan="3"></th> | |
</tr> | |
</thead> |