Sha256: 2056c46b27b941145afe417e119e406ed35e8f0812a5bb5954330597b95f9dfc

Contents?: true

Size: 420 Bytes

Versions: 1

Compression:

Stored size: 420 Bytes

Contents

#!/usr/bin/env ruby

files = if !ARGV.empty?
          ARGV.select { |file| File.exist?(file) }
        else
          Dir['*_example.md']
        end

files.each do |file|
  puts "Executing #{file.split('.')[0].tr('_', ' ')}"
  code = File.read(file).match(/```ruby(?<code>.+)```/m)[:code]
  unless code.nil?
    eval(['$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"', code].join("\n"))
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caxlsx-3.2.0 examples/generate.rb