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 'http://rubygems.org' | |
| # gem 'rails', '3.0.0' | |
| gem 'rails', '3.0.3' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'sqlite3-ruby', :require => 'sqlite3' |
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
| GEM | |
| remote: http://rubygems.org/ | |
| specs: | |
| ZenTest (4.4.2) | |
| abstract (1.0.0) | |
| actionmailer (3.0.3) | |
| actionpack (= 3.0.3) | |
| mail (~> 2.2.9) | |
| actionpack (3.0.3) | |
| activemodel (= 3.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
| GEM | |
| remote: http://rubygems.org/ | |
| specs: | |
| ZenTest (4.4.2) | |
| abstract (1.0.0) | |
| actionmailer (3.0.3) | |
| actionpack (= 3.0.3) | |
| mail (~> 2.2.9) | |
| actionpack (3.0.3) | |
| activemodel (= 3.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
| <!DOCTYPE html> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
| <head> | |
| <title>memofire_lessons</title> | |
| <!--Working Master CSS to Validate--> | |
| <%= stylesheet_link_tag 'shared_styles', | |
| 'lessons' | |
| %> | |
| </head> |
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 ObjectPrinter | |
| #changed param name to item so it's clearer we're sticking an "item" in there and not the class "ObjectPrinter" itself | |
| def print_methods(item) | |
| #added a little space and header to make it easier to read | |
| 3.times {puts ""} | |
| puts "#{item} methods:" | |
| puts "----------------------------" | |
| puts "" |
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 Piano | |
| attr_accessor :brand, :age, :power | |
| def initialize | |
| @brand = "steinway" | |
| @age = 10 | |
| @power = 0 | |
| 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
| MAX_NUMBER = 50 | |
| MIN_NUMBER = 0 | |
| GUESS_LIMIT = 5 | |
| @computers_number = rand(MAX_NUMBER - MIN_NUMBER + 1) + MIN_NUMBER | |
| def over_guess_limit? | |
| if @guess_count > GUESS_LIMIT | |
| puts "You're over the guess limit!" | |
| 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 Fixnum | |
| def seconds | |
| self | |
| end | |
| def minutes | |
| self * 60 | |
| 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
| #analyzer.rb -- Text Analyzer | |
| stopwords = %w{the a by on for of are with just but and to the my I has some in} | |
| lines = File.readlines(ARGV[0]) | |
| line_count = lines.size | |
| text = lines.join | |
| #count the characters | |
| character_count = text.length |
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
| <html> | |
| <head> | |
| <script type="text/javascript"> | |
| var c=0; | |
| var t; | |
| var timer_is_on=0; | |
| function timedCount() | |
| { | |
| document.getElementById('txt').value=c; |
OlderNewer