Sha256: a4e171591542925a9331a052bc682ca3406036e1cbdecd816c78cd335603b628

Contents?: true

Size: 498 Bytes

Versions: 29

Compression:

Stored size: 498 Bytes

Contents

require 'nenv/version'

require 'nenv/autoenvironment'
require 'nenv/builder'

def Nenv(namespace = nil)
  Nenv::AutoEnvironment.new(namespace).tap do |env|
    yield env if block_given?
  end
end

module Nenv
  class << self
    def respond_to?(meth)
      instance.respond_to?(meth)
    end

    def method_missing(meth, *args)
      instance.send(meth, *args)
    end

    def reset
      @instance = nil
    end

    def instance
      @instance ||= Nenv::AutoEnvironment.new
    end
  end
end

Version data entries

29 entries across 29 versions & 10 rubygems

Version Path
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/nenv-0.3.0/lib/nenv.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/nenv-0.3.0/lib/nenv.rb
op_connect-0.1.2 vendor/bundle/ruby/3.1.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.35 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.34 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.33 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.32 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.31 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.30 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.29 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.28 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.27 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.26 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
qiita_org-0.1.25 gems/ruby/2.7.0/gems/nenv-0.3.0/lib/nenv.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/nenv-0.3.0/lib/nenv.rb
alimentos-alu0100945645-0.1.0 vendor/bundle/ruby/2.3.0/gems/nenv-0.3.0/lib/nenv.rb
alimentos-alu0100945645-1.0.0 vendor/bundle/ruby/2.3.0/gems/nenv-0.3.0/lib/nenv.rb
comiditaULL-0.1.1 vendor/bundle/ruby/2.3.0/gems/nenv-0.3.0/lib/nenv.rb
comidita_ull-0.1.1 vendor/bundle/ruby/2.3.0/gems/nenv-0.3.0/lib/nenv.rb
comidita_ull-0.1.0 vendor/bundle/ruby/2.3.0/gems/nenv-0.3.0/lib/nenv.rb