###Brett Sanders web developer
email: [email protected]
phone: 760-815-8982
about: http://meetbrett.com/
github: https://github.com/brettsanders
linkedin: www.linkedin.com/pub/brett-sanders/34/a57/8a3/
| ############################ | |
| # INPUT | |
| ############################ | |
| # array | |
| rolls = "6 2 7 1 10 9 0 8 2 10 10 3 5 7 2 5 5 8 0".split(" ").map{|num| num.to_i} | |
| ############################ | |
| # PROCESS data_for_display | |
| ############################ |
###Brett Sanders web developer
email: [email protected]
phone: 760-815-8982
about: http://meetbrett.com/
github: https://github.com/brettsanders
linkedin: www.linkedin.com/pub/brett-sanders/34/a57/8a3/
| //------------------------------------------------------------------------------------------------------------------ | |
| // YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
| //------------------------------------------------------------------------------------------------------------------ | |
| function Animal(name,leg_count) { | |
| this.name = name; | |
| this.leg_count = leg_count; | |
| } | |
| Animal.prototype.identify = function(){ |
| <!doctype html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
| <link rel="stylesheet" href="main.css"> | |
| <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
| <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
| <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
| </head> |
| # puts "/Users/apprentice/Dropbox/DBC-Chicago/Grasshoppers/brettsanders/week_2/\ | |
| # wednesday/p5_oo_inheritance.rb" | |
| # puts "- - - - - - - - -" | |
| class Car | |
| @@WHEELS = 4 | |
| def initialize(args) | |
| @color = args[:color] | |
| @wheels = @@WHEELS | |
| end |
| # Determine whether a string contains a Social Security number. | |
| def has_ssn?(string) | |
| string =~ /\d{3}-\d{2}-\d{4}/ | |
| end | |
| # Return the Social Security number from a string. | |
| def grab_ssn(string) | |
| grab_all_ssns(string).first | |
| end |
| class GuessingGame | |
| def initialize(guess) | |
| @answer = rand(guess) | |
| @guess = nil | |
| end | |
| def solved? | |
| @guess == @answer | |
| end |
| /* | |
| * This is a manifest file that'll be compiled into application.css, which will include all the files | |
| * listed below. | |
| * | |
| * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, | |
| * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. | |
| * | |
| * You're free to add application-wide styles to this file and they'll appear at the top of the | |
| * compiled file, but it's generally better to create a new file per style scope. | |
| * |