Skip to content

Commit fb23b71

Browse files
committed
2020-09-27 Update: Refactored project structure
1 parent be4ff18 commit fb23b71

File tree

57 files changed

+153
-153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+153
-153
lines changed

codewars/kyu6/common_array_elements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def initialize(
1010
@third_array = third_array
1111
end
1212

13-
def result
13+
def solution
1414
first_common = @first_array - (@first_array - @second_array) - (@first_array - @third_array)
1515
second_common = @second_array - (@second_array - @first_array) - (@second_array - @third_array)
1616
third_common = @third_array - (@third_array - @first_array) - (@third_array - @second_array)

codewars/kyu6/is_it_an_isogram.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def initialize(input)
44
@input = input
55
end
66

7-
def result
7+
def solution
88
return false if invalid?(@input)
99

1010
@input.downcase.chars.select { |c| (97..122).include? c.ord }.inject(Hash.new(0)) { |h, v| h[v] += 1; h }.values.uniq.size == 1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# https://www.codewars.com/kata/5a751a31373c2e645b000096
22
class Five
3-
def result
3+
def solution
44
'+++++_' =~ /\_+/
55
end
66
end

codewars/kyu7/alphabetically_ordered.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def initialize(input)
44
@input = input
55
end
66

7-
def result
7+
def solution
88
@input.split('').sort.join == @input
99
end
1010
end

codewars/kyu7/char_to_ascii.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def initialize(input)
44
@input = input
55
end
66

7-
def result
7+
def solution
88
return nil if @input.empty?
99

1010
Hash[@input.scan(/[A-Za-z]/).collect { |c| [c, c.ord] }]

codewars/kyu7/convert_hash_to_an_array.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def initialize(input)
44
@input = input
55
end
66

7-
def result
7+
def solution
88
@input.collect { |k, v| [k.to_s, v] }
99
end
1010
end

codewars/kyu7/factorial.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def initialize(input)
44
@input = input
55
end
66

7-
def result
7+
def solution
88
return 1 if @input < 2
99

1010
Array(1..@input).inject(:*)

codewars/kyu7/find_duplicates.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def initialize(input)
44
@input = input
55
end
66

7-
def result
7+
def solution
88
@input.uniq.select { |c| @input.count(c) > 1 }
99
end
1010
end

codewars/kyu7/get_list_sum_recursively.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def initialize(input)
44
@input = input
55
end
66

7-
def result
7+
def solution
88
sum(@input.size - 1)
99
end
1010

codewars/kyu7/hashy_string_to_a_hash.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def initialize(input)
44
@input = input
55
end
66

7-
def result
7+
def solution
88
eval(@input)
99
end
1010
end

0 commit comments

Comments
 (0)