Nested Inclusions : require « Language Basics « Ruby






Nested Inclusions


//assume a.rb contains the following:
require 'b'

//And b.rb contains the following:
require 'c'

//And c.rb contains the following:
def example
  puts "Hello!"
end

//And d.rb contains the following:
require 'a'

 








Related examples in the same category

1.put this code in a file called string_extensions.rb:
2.Test require command
3.A commonly used shortcut uses arrays to quickly load a collection of libraries at once.