A¯
https://github.com/nickolas98/tabik
Я тоже хочу запустить, глянуть Что там
Size: a a a
A¯
Уд
?
KѨ
A¯
М
A¯
1
КК
СБ
СБ
# not my code (external gem)
class Main
def main=(foo: 42, bar: 'default_text')
# some code, use foo and bar variables
end
end
# my code
Main.new.main= { foo: 1, bar: 'custom_text' }
: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
: warning: The called method `main=' is defined here
# my code
hash = { foo: 1, bar: 'custom_text' }
Main.new.send 'main=', **hash
SD
# not my code (external gem)
class Main
def main=(foo: 42, bar: 'default_text')
# some code, use foo and bar variables
end
end
# my code
Main.new.main= { foo: 1, bar: 'custom_text' }
: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
: warning: The called method `main=' is defined here
# my code
hash = { foo: 1, bar: 'custom_text' }
Main.new.send 'main=', **hash
Main.new.main= **{ foo: 1, bar: 'custom_text' }не взлетит?
СБ
Main.new.main= **{ foo: 1, bar: 'custom_text' }не взлетит?
syntax error, unexpected **arg
СБ
class Main
def main= foo, bar
end
end
Main.new.main= 1, 2
method_name=
всегда ждёт только один аргумент.SD
# not my code (external gem)
class Main
def main=(foo: 42, bar: 'default_text')
# some code, use foo and bar variables
end
end
# my code
Main.new.main= { foo: 1, bar: 'custom_text' }
: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
: warning: The called method `main=' is defined here
# my code
hash = { foo: 1, bar: 'custom_text' }
Main.new.send 'main=', **hash
Main.new.method(:main=).call(hash)мб
SD
SD
Main.new.method(:main=).(hash)