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
    
  
  
    
  | var errors = []; | |
| validateEmail = function(email) { | |
| var format = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/; | |
| if (!email.match(format)) { | |
| errors.push('Must be a valid email address'); | |
| } | |
| }; | |
| validatePassword = function(password) { | 
  
    
      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
    
  
  
    
  | /* Here is your chance to take over Socrates! | |
| Spend 10 minutes on each of the following hacks to the socrates website. | |
| Enter them in the console to make sure it works and then save | |
| your results here. | |
| Choose a new pair for each. Add your names to the section you complete. | |
| */ | |
  
    
      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
    
  
  
    
  | /* Here is your chance to take over Socrates! | |
| Spend 10 minutes on each of the following hacks to the socrates website. | |
| Enter them in the console to make sure it works and then save | |
| your results here. | |
| Choose a new pair for each. Add your names to the section you complete. | |
| */ | 
  
    
      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> | |
| <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> | 
  
    
      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
    
  
  
    
  | https://github.com/danillawafer/ar-sunlight-legislators | 
  
    
      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 Hospital | |
| attr_reader :name, :location, :employees, :patients | |
| def initialize(attributes) | |
| @name = attributes[:name] | |
| @location = attributes[:location] | |
| @employees = [] | |
| @patients = [] | |
| add_administrator(attributes[:administrator]) | |
| 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 Vehical | |
| def initialize(args) | |
| @color = args[:color] | |
| @oil_slicks = args[:oil_slicks] | |
| @mood = args[:mood] || :calm | |
| end | |
| def brake | |
| @status = :stopped | |
| 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 flatten(array) | |
| array.each do |check| | |
| if check.kind_of?(Array) #Checks to see if the item is a nested array, if it is... | |
| check.each do |into| #Each item in that nested array is appended to the array | |
| array << into | |
| end | |
| array.delete(check) #The original nested array is deleted | |
| flatten(array) #The method calls itself, avoids endless loop because it is only | |
| end #called when the method finds a nested array | |
| end |