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 CrazyMath | |
| def initialize(below, *multiple_of) | |
| @below = below | |
| @multiple_of = multiple_of | |
| end | |
| def sum_of_multiples | |
| array_of_multiples | |
| @multiples.uniq.inject(:+) |
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 Palindrome | |
| def initialize(digits) | |
| @digits = digits | |
| end | |
| def largest_palindrome | |
| num_arr = build_numbers | |
| decrement_zero = num_arr[0] | |
| decrement = 0 |
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 FizzBuzz | |
| def initialize(fizz, buzz, cap) | |
| @fizz = fizz | |
| @buzz = buzz | |
| @cap = cap | |
| end | |
| def fizzbuzz_n_print | |
| fizzbuzz_it |
NewerOlder