Mo.*_*Mo. 3 ruby ruby-on-rails
您好
是否可以从ruby中的方法返回包含数组和散列的数组?
即
def something
array_new = [another_thing, another_thing_2]
hash_map = get_hash()
return [array_new, hash_map]
end
Run Code Online (Sandbox Code Playgroud)
并检索数组:
some_array, some_hash = something()
Run Code Online (Sandbox Code Playgroud)
谢谢
| 归档时间: |
|
| 查看次数: |
6669 次 |
| 最近记录: |