Sha256: 0e9174f7a15f08fe7d2b1a93bb50cede2f8eb7840d6df3be794c4ffc49d99168

Contents?: true

Size: 822 Bytes

Versions: 4

Compression:

Stored size: 822 Bytes

Contents

require 'rvm'
require 'cuken/api/common'
require 'cuken/api/rvm/common'
require 'cuken/api/rvm/gemsets'

module ::Cuken
  module Api
    module Rvm

      extend ::RVM
      include ::Cuken::Api::Rvm::Common
      include ::Cuken::Api::Aruba::Api

      class RvmHelper

        attr_reader :environment

        def init
          RVM::Environment
        end

        def current
          @current = RVM.current
        end

        def environment_name
          current.environment_name
        end

        def gemset
          current.gemset
        end

        def environment(gemset, options={})
          @environment = self.new(gemset, options)
          yield @environment if block_given?
          @environment
        end
      end

      def rvm
        @rvm ||= RvmHelper.new
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cuken-0.1.22 lib/cuken/api/rvm.rb
cuken-0.1.21 lib/cuken/api/rvm.rb
cuken-0.1.20 lib/cuken/api/rvm.rb
cuken-0.1.19 lib/cuken/api/rvm.rb