Top Level Namespace

Includes:
Ruby2D, Ruby2D::DSL

Defined Under Namespace

Modules: Ruby2D Classes: String

Constant Summary collapse

S2D_VERSION =

Minimum Simple 2D version required

'0.2.1'

Constants included from Ruby2D

Ruby2D::VERSION

Instance Method Summary collapse

Methods included from Ruby2D::DSL

#clear, #get, #hello, #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(`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