Sha256: 0324df92af3e14c30a7bf8c35a2cbd5c323951d8374c53f31e4167f6ed6b52fe

Contents?: true

Size: 485 Bytes

Versions: 9

Compression:

Stored size: 485 Bytes

Contents

#!/usr/bin/env ruby

# Script to auto generate op stub file from the opdef folder

require "bundler/setup"
require "tensor_stream"
require "erb"

target = File.join(__dir__, '..', 'lib', 'tensor_stream', 'generated_stub')

FileUtils.mkdir_p(target)

stub_file = File.join(target, 'ops.rb')
File.delete(stub_file) if File.exist?(stub_file)

f = File.open(stub_file, 'wb')

template = File.read(File.join(target, 'stub_file.erb'))
f << ERB.new(template, nil, '%').result(binding)
f.close

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tensor_stream-1.0.9 bin/stubgen
tensor_stream-1.0.8 bin/stubgen
tensor_stream-1.0.7 bin/stubgen
tensor_stream-1.0.6 bin/stubgen
tensor_stream-1.0.5 bin/stubgen
tensor_stream-1.0.4 bin/stubgen
tensor_stream-1.0.3 bin/stubgen
tensor_stream-1.0.2 bin/stubgen
tensor_stream-1.0.1 bin/stubgen