| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
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 experience_check(candidates, years_of_experience) | |
| candidates.select {|candidate| candidate[:years_of_experience] >= years_of_experience} | |
| end | |
| def min_github_points_check(candidates, min_github_points) | |
| candidates.select {|candidate| candidate[:github_points] >= min_github_points} | |
| end | |
| def language_check(candidates) | |
| candidates.select {|candidate| candidate[:languages].include?('Ruby') || candidate[:languages].include?('Python')} |
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
| states.each do |states, states_info| | |
| cities_list = states_info[:cities] | |
| if cities_list.include?(user_input) | |
| puts states | |
| 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
| def non_duplicated_values(values) | |
| values.find_all {|num| values.count(num) == 1} | |
| 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
| for num in 1..100 | |
| if num % 3 == 0 | |
| puts "Fizz" | |
| elsif num % 5 == 0 | |
| puts "Buzz" | |
| else | |
| puts num | |
| 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
| def length_finder(input_array) | |
| input_array.collect {|array| array.length} | |
| 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 add(*numbers) | |
| numbers.inject(0) { |sum, number| sum + number } | |
| end | |
| def subtract(*numbers) | |
| sum = numbers.shift | |
| numbers.inject(sum) { |sum, number| sum - number } | |
| end |