Sha256: c518e3d5339d0b15076b685f21729ba3fe8e6be70ce5740eb783a3fa6baf77cd
Contents?: true
Size: 947 Bytes
Versions: 1
Compression:
Stored size: 947 Bytes
Contents
# frozen_string_literal: true require 'pathname' require 'mwc/version' require 'mwc/config' # WebAssembly compile tool for mruby module Mwc # The project root # # @return [Pathname] the root # # @since 0.1.0 # @api private def self.root return @root unless @root.nil? @root ||= Pathname.pwd @root ||= Bundler.root if defined?(::Bundler) @root end # Set project root # # @param path [String|Pathname] the root path # # @since 0.1.0 # @api private def self.root=(path) @root = Pathname.new(path) end # The mwc config # # @return [Mwc::Config] the config # # @since 0.1.0 # @api private def self.config Mwc::Config.instance end # The thor template source root # # @return [String] the source root path # # @since 0.1.0 # @api private def self.source_root Pathname .new(File.dirname(__FILE__)) .join('mwc', 'templates') .to_s end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mwc-0.2.0 | lib/mwc.rb |