Top Level Namespace

Extended by:
Ruby2D::DSL
Includes:
Ruby2D

Defined Under Namespace

Modules: Ruby2D Classes: String

Constant Summary collapse

S2D_VERSION =

Simple 2D minimum version required

'0.9.0'

Constants included from Ruby2D

Ruby2D::VERSION

Instance Method Summary collapse

Methods included from Ruby2D::DSL

clear, close, get, off, on, set, show, update

Instance Method Details

#check_s2d_versionObject



19
20
21
22
23
24
25
26
27
# File 'ext/ruby2d/extconf.rb', line 19

def check_s2d_version
  unless Gem::Version.new(`bash simple2d --version`) >= Gem::Version.new(S2D_VERSION)
    $errors << "Simple 2D needs to be updated for this version of Ruby 2D." <<
               "Run the following, then try reinstalling this gem:\n" <<
               "  simple2d update".bold
    print_errors
    exit
  end
end


12
13
14
15
16
17
# File 'ext/ruby2d/extconf.rb', line 12

def print_errors
  puts "
#{"== #{"Ruby 2D Installation Errors".red} =======================================\n"}
  #{$errors.join("\n  ")}\n
#{"======================================================================="}"
end