代码之家  ›  专栏  ›  技术社区  ›  krunal shah

要求和包含有什么区别?[副本]

  •  1
  • krunal shah  · 技术社区  · 15 年前

    可能重复:
    What is the difference between include and require in Ruby?

    require File.join(File.dirname(__FILE__), 'load_test_data.rb')
    require 'find'
    require 'fileutils'
    
    include CommonValidators
    

    有人能给我举个恰当的例子来说明 require include

    1 回复  |  直到 8 年前
        1
  •  2
  •   Community Mohan Dere    8 年前
    推荐文章