my_same_class_method => my_method_in_the_same_class for clarity
This commit is contained in:
@@ -92,16 +92,16 @@ class AboutMethods < EdgeCase::Koan
|
|||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
def my_same_class_method(a, b)
|
def my_method_in_the_same_class(a, b)
|
||||||
a * b
|
a * b
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_calling_methods_in_same_class
|
def test_calling_methods_in_same_class
|
||||||
assert_equal __, my_same_class_method(3,4)
|
assert_equal __, my_method_in_the_same_class(3,4)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_calling_methods_in_same_class_with_explicit_receiver
|
def test_calling_methods_in_same_class_with_explicit_receiver
|
||||||
assert_equal __, self.my_same_class_method(3,4)
|
assert_equal __, self.my_method_in_the_same_class(3,4)
|
||||||
end
|
end
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|||||||
@@ -102,16 +102,16 @@ class AboutMethods < EdgeCase::Koan
|
|||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
def my_same_class_method(a, b)
|
def my_method_in_the_same_class(a, b)
|
||||||
a * b
|
a * b
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_calling_methods_in_same_class
|
def test_calling_methods_in_same_class
|
||||||
assert_equal __(12), my_same_class_method(3,4)
|
assert_equal __(12), my_method_in_the_same_class(3,4)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_calling_methods_in_same_class_with_explicit_receiver
|
def test_calling_methods_in_same_class_with_explicit_receiver
|
||||||
assert_equal __(12), self.my_same_class_method(3,4)
|
assert_equal __(12), self.my_method_in_the_same_class(3,4)
|
||||||
end
|
end
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user