Ruby and duck typing: design by contract impossible?

后端 未结 8 1545
别那么骄傲
别那么骄傲 2020-12-14 09:16

Method signature in Java:

public List getFilesIn(List directories)

similar one in ruby

def get_fi         


        
8条回答
  •  爱一瞬间的悲伤
    2020-12-14 09:32

    I made a half-baked attempt at something like dbc for Ruby a few years ago, may give folks some ideas about how to move forward with a more comprehensive solution:

    https://github.com/justinwiley/higher-expectations

提交回复
热议问题