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
    
  
  
    
  | const APIWrapper = require('./APIWrapper') | |
| const Service, Characteristic | |
| module.exports = function (homebridge) { | |
| Service = homebridge.hap.Service; | |
| Characteristic = homebridge.hap.Characteristic; | |
| homebridge.registerAccessory("switch-plugin", "MyAwesomeSwitch", mySwitch); | |
| }; | |
| mySwitch.prototype = { | 
  
    
      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
    
  
  
    
  | # routes.rb | |
| get 'register', to: 'users#new' | |
| get 'sign_in', to: 'sessions#new' | |
| resources :users, only: [:create] | |
| # users_controller.rb | |
| def new | |
| @user = User.new | |
| 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
    
  
  
    
  | arr = (1..10).to_a | |
| # 1. Use the "each" method of Array to iterate over [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], and print out each value. | |
| arr.each do |number| | |
| puts number | |
| end | |
| # 2. Same as above, but only print out values greater than 5. | |
| arr.each do |number| | |
| puts number if number > 5 | 
  
    
      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 "pry" | |
| puts "Welcome to your calaculator!" | |
| puts "What's the first #?" | |
| num1 = gets.chomp | |
| puts "What's the second number?" | |
| num2 = gets.chomp |