Module: MRuby::CLI::Source

Defined in:
lib/mruby/cli/source.rb

Overview

Wrapper around MRuby::Source module to stop execution if MRuby’s source is not available

Constant Summary collapse

ERROR_MESSAGE =
"\nError:\n  To execute this action you need a copy of MRuby's source.\n\n  Add this to your Gemfile:\n\n      gem \"mruby-source\", github: 'sagmor/mruby', branch: 'gem'\n\n  Run bundle install and re-run your last command\n\n"

Class Method Summary collapse

Class Method Details

.pathObject



17
18
19
20
21
22
23
24
# File 'lib/mruby/cli/source.rb', line 17

def self.path
  require 'mruby/source'

  MRuby::Source::ROOT
rescue LoadError
  puts ERROR_MESSAGE
  exit 1
end