I
class
Animaldef hello(
a)
puts
aend
end
class
Dog < Animal
def hello(
a)
super
end
end
Dog.new.hello('check')
Size: a a a
I
class
Animaldef hello(
a)
puts
aend
end
class
Dog < Animal
def hello(
a)
super
end
end
Dog.new.hello('check')
DG
DG
class
Animaldef hello(
a)
puts yield.downcase
puts
aend
end
class
Dog < Animal
def hello(
a)
super
end
end
Dog.new.hello('check') { 'BLOCK TEXT' }
DG
I
class
Animaldef hello(
a)
puts yield.downcase
puts
aend
end
class
Dog < Animal
def hello(
a)
super
end
end
Dog.new.hello('check') { 'BLOCK TEXT' }
class Dog
def hello1(a)
puts yield.downcase
puts a
end
end
def hello(...)
puts "мне нужно как то подценить check переданный в этот метод"
hello1(...)
end
Dog.new.hello('check') { 'BLOCK TEXT' }
DG
I
DG
def hello(
a)
puts yield.downcase
puts
aend
DG
I
def hello(
a)
puts yield.downcase
puts
aend
DG
I
helloа мне нужно что бы он дальше пошел в
hello1
DG
I
MK