Sha256: e566563174154468fb21d53404da2b75f878808a74a260b342868e224518d0ef

Contents?: true

Size: 491 Bytes

Versions: 1

Compression:

Stored size: 491 Bytes

Contents

#!/usr/bin/env ruby
require 'filipinomemes/compiler'
require 'rubygems'

if ARGV[0].nil?
  puts <<-EOS
Unknown file. The correct syntax is:

filipinomemes file.bt
  EOS
else
  ARGV.each do |file|
    next unless file
    compiler = Filipinomemes::Compiler.new
    code = File.read file, encoding: 'utf-8'
    ruby_code = compiler.sa_ruby code
    raise 'The lowest version of Ruby needed is 2.4' if
      Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3')
    eval ruby_code
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
filipinomemes-1.0.0 bin/filipinomemes