http://www.abeautifulsite.net/recording-a-screencast-with-quicktime/ https://www.dropbox.com/s/r1591r9sbqji8k0/screencasting_with_system_audio.pdf?dl=1
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_relative "wheel" | |
| require_relative "gear" | |
| class Bicycle | |
| attr_reader :wheel, :gear | |
| def initialize(wheel = Wheel.new(:racing), gear = Gear.new(:high)) | |
| @wheel = wheel | |
| @gear = gear | |
| 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
| require_relative "bicycle" | |
| def runtest(expression) | |
| puts expression ? "Passed" : "Failed" | |
| # puts if expression | |
| # "Passed" | |
| # else | |
| # "Failed" | |
| # 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
| require "httparty" | |
| require "nokogiri" | |
| stock_code = ARGV[0] | |
| url = "http://finance.yahoo.com/q?s=#{stock_code}" | |
| response = HTTParty.get url | |
| dom = Nokogiri::HTML(response.body) |
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
| Pry.config.should_load_plugins = true | |
| # Pry.plugins["doc"].activate! | |
| begin | |
| require 'awesome_print' | |
| AwesomePrint.pry! | |
| rescue LoadError => err | |
| puts "no awesome_print :(" | |
| 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
| def a | |
| b | |
| end | |
| def b | |
| c | |
| end | |
| def c | |
| d |
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 Table | |
| attr_reader :num_legs | |
| def initialize(num_legs) | |
| if num_legs > 0 | |
| @num_legs = num_legs | |
| elsif num_legs == 0 | |
| raise "Tables have one or more legs." | |
| else | |
| raise ArgumentError, "The number of legs has to be greater than zero." |
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 Table | |
| attr_reader :num_legs | |
| def initialize(num_legs) | |
| if num_legs > 0 | |
| @num_legs = num_legs | |
| elsif num_legs == 0 | |
| raise "Tables have one or more legs." | |
| else | |
| raise ArgumentError, "The number of legs has to be greater than zero." |
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 Table | |
| attr_reader :num_legs | |
| def initialize(num_legs) | |
| if num_legs > 0 | |
| @num_legs = num_legs | |
| elsif num_legs == 0 | |
| raise "Tables have one or more legs." | |
| else | |
| raise ArgumentError, "The number of legs has to be greater than zero." |
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 Table | |
| attr_reader :num_legs | |
| def initialize(num_legs) | |
| if num_legs > 0 | |
| @num_legs = num_legs | |
| elsif num_legs == 0 | |
| raise "Tables have one or more legs." | |
| else | |
| raise ArgumentError, "The number of legs has to be greater than zero." |