Sha256: fafcaf61b8f2ef44ed35afa3e02b421befae42be39fb92609e66372984f57cf2

Contents?: true

Size: 650 Bytes

Versions: 26

Compression:

Stored size: 650 Bytes

Contents

module Scorpion
  # Adds a #scorpion method to an object.
  module Method
    # @overload scorpion
    #   @return [Scorpion] the object's scorpion used to hunt down dependencies.
    # @overload scorpion( scope )
    #   Stings the given `scope` with the current scorpion.
    #   @param [#with_scorpion] scope an object that responds to #with_scorpion that
    #     receives the current scorpion.
    #   @return [scope] stung object.
    def scorpion( scope = nil )
      if scope
        scope.with_scorpion( scorpion )
      else
        @scorpion
      end
    end

    private def scorpion=( value )
      @scorpion = value
    end

  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
scorpion-ioc-0.6.2 lib/scorpion/method.rb
scorpion-ioc-0.6.1 lib/scorpion/method.rb
scorpion-ioc-0.6.0 lib/scorpion/method.rb
scorpion-ioc-0.5.23 lib/scorpion/method.rb
scorpion-ioc-0.5.22 lib/scorpion/method.rb
scorpion-ioc-0.5.21 lib/scorpion/method.rb
scorpion-ioc-0.5.20 lib/scorpion/method.rb
scorpion-ioc-0.5.19 lib/scorpion/method.rb
scorpion-ioc-0.5.18 lib/scorpion/method.rb
scorpion-ioc-0.5.17 lib/scorpion/method.rb
scorpion-ioc-0.5.16 lib/scorpion/method.rb
scorpion-ioc-0.5.15 lib/scorpion/method.rb
scorpion-ioc-0.5.14 lib/scorpion/method.rb
scorpion-ioc-0.5.13 lib/scorpion/method.rb
scorpion-ioc-0.5.12 lib/scorpion/method.rb
scorpion-ioc-0.5.11 lib/scorpion/method.rb
scorpion-ioc-0.5.10 lib/scorpion/method.rb
scorpion-ioc-0.5.9 lib/scorpion/method.rb
scorpion-ioc-0.5.8 lib/scorpion/method.rb
scorpion-ioc-0.5.7 lib/scorpion/method.rb