method

lib

lib(filename, data = nil)
public

Creates a file in lib/. The contents can be specified as an argument or as the return value of the block.

lib "foreign.rb", <<~RUBY
  # Foreign code is fun
RUBY

lib "foreign.rb" do
  "# Foreign code is fun"
end