Sha256: dc8e2ac7e916c61bd63f971dbe50b9ff29bbe4fbaac62cfe3e23e05d2386f4dc

Contents?: true

Size: 238 Bytes

Versions: 7

Compression:

Stored size: 238 Bytes

Contents

module Nodo
  class Dependency
    attr_reader :name, :package
    
    def initialize(name, package)
      @name, @package = name, package
    end
  
    def to_js
      "const #{name} = require(#{package.to_json});\n"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nodo-1.6.0 lib/nodo/dependency.rb
nodo-1.5.6 lib/nodo/dependency.rb
nodo-1.5.5 lib/nodo/dependency.rb
nodo-1.5.4 lib/nodo/dependency.rb
nodo-1.5.3 lib/nodo/dependency.rb
nodo-1.5.1 lib/nodo/dependency.rb
nodo-1.5.0 lib/nodo/dependency.rb