Class: EmbeddedJs::GemPackage
- Inherits:
-
Object
- Object
- EmbeddedJs::GemPackage
- Defined in:
- lib/embedded_js/gem_package.rb
Instance Method Summary collapse
-
#initialize(engine, io: Adaptors::IO.new, package_config: PackageConfig.new(EmbeddedJs.gem_specs.find { |s| s.name == engine }&.full_gem_path)) ⇒ GemPackage
constructor
A new instance of GemPackage.
- #with_path {|tmp_path| ... } ⇒ Object
Constructor Details
#initialize(engine, io: Adaptors::IO.new, package_config: PackageConfig.new(EmbeddedJs.gem_specs.find { |s| s.name == engine }&.full_gem_path)) ⇒ GemPackage
Returns a new instance of GemPackage.
8 9 10 11 12 13 14 15 16 |
# File 'lib/embedded_js/gem_package.rb', line 8 def initialize( engine, io: Adaptors::IO.new, package_config: PackageConfig.new(EmbeddedJs.gem_specs.find { |s| s.name == engine }&.full_gem_path) ) @engine = engine @io = io @package_config = package_config end |
Instance Method Details
#with_path {|tmp_path| ... } ⇒ Object
18 19 20 21 22 23 |
# File 'lib/embedded_js/gem_package.rb', line 18 def with_path io.mkdir(path: tmp_path) copy_specified_files(tmp_path) yield tmp_path end |