-
Notifications
You must be signed in to change notification settings - Fork 43
2370-1 #134
base: master
Are you sure you want to change the base?
2370-1 #134
Conversation
2199 - 0
Add 1.rb
created and fixed
2370/1/about_message_passing.rb
Outdated
# Koans. | ||
end | ||
|
||
# ------------------------------------------------------------------ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/CommentIndentation: Incorrect indentation detected (column 3 instead of 2).
2370/1/about_message_passing.rb
Outdated
mc = MessageCatcher.new | ||
|
||
assert mc.send('caught?') | ||
assert mc.send('caught' '?') # What do you need to add to the first string? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/ImplicitStringConcatenation: Combine 'caught' and '?' into a single string literal, rather than using implicit string concatenation. Or, if they were intended to be separate method arguments, separate them with a comma.
Layout/ExtraSpacing: Unnecessary spacing detected.
2370/1/about_array_assignment.rb
Outdated
last_name = "Rob" | ||
first_name, last_name = last_name, first_name | ||
assert_equal "Rob", first_name | ||
assert_equal "Roy", last_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
2370/1/about_array_assignment.rb
Outdated
first_name = "Roy" | ||
last_name = "Rob" | ||
first_name, last_name = last_name, first_name | ||
assert_equal "Rob", first_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
2370/1/about_array_assignment.rb
Outdated
|
||
def test_swapping_with_parallel_assignment | ||
first_name = "Roy" | ||
last_name = "Rob" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
2370/1/about_array_assignment.rb
Outdated
|
||
def test_parallel_assignments_with_too_few_variables | ||
first_name, last_name = ["Cher"] | ||
assert_equal "Cher", first_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
2370/1/about_array_assignment.rb
Outdated
end | ||
|
||
def test_parallel_assignments_with_too_few_variables | ||
first_name, last_name = ["Cher"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
2370/1/about_array_assignment.rb
Outdated
def test_parallel_assignments_with_splat_operator | ||
first_name, *last_name = ["John", "Smith", "III"] | ||
assert_equal "John", first_name | ||
assert_equal ["Smith", "III"], last_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/WordArray: Use %w or %W for an array of words.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
2370/1/about_array_assignment.rb
Outdated
|
||
def test_parallel_assignments_with_splat_operator | ||
first_name, *last_name = ["John", "Smith", "III"] | ||
assert_equal "John", first_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
2370/1/about_array_assignment.rb
Outdated
end | ||
|
||
def test_parallel_assignments_with_splat_operator | ||
first_name, *last_name = ["John", "Smith", "III"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/WordArray: Use %w or %W for an array of words.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
2370/1/about_array_assignment.rb
Outdated
@@ -0,0 +1,53 @@ | |||
require File.expand_path(File.dirname(__FILE__) + '/neo') | |||
|
|||
class AboutArrayAssignment < Neo::Koan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/Documentation: Missing top-level class documentation comment.
@anatoliliotych Could you please help me with this |
run it locally with docker from Lomov. |
661e292
to
c7d1461
Compare
2370/1/about_message_passing.rb
Outdated
# ------------------------------------------------------------------ | ||
# Comment | ||
class WellBehavedFooCatcher | ||
# rubocop:disable Style/MethodMissing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/CommentIndentation: Incorrect indentation detected (column 2 instead of 4).
Номер
2370
Номер задания
1
Ссылка на видео с демо
Комментарии