Sha256: 2fa7320525be46f5ab2d3a41ba85ac0ec268faab16c66c801b38c82c7f9c4c1f

Contents?: true

Size: 443 Bytes

Versions: 9

Compression:

Stored size: 443 Bytes

Contents

require "scorpion/dependency"

module Scorpion
  class Dependency
    # {Dependency} for an captured argument.
    # @see {Scorpion#argument}.
    class ArgumentDependency < Scorpion::Dependency

      attr_reader :argument

      def initialize( argument )
        @argument = argument
      end

      def fetch( *args )
        argument
      end

      def satisfies?( contract )
        contract === argument
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
scorpion-ioc-1.0.10 lib/scorpion/dependency/argument_dependency.rb
scorpion-ioc-1.0.8 lib/scorpion/dependency/argument_dependency.rb
scorpion-ioc-1.0.7 lib/scorpion/dependency/argument_dependency.rb
scorpion-ioc-1.0.6 lib/scorpion/dependency/argument_dependency.rb
scorpion-ioc-1.0.4 lib/scorpion/dependency/argument_dependency.rb
scorpion-ioc-1.0.3 lib/scorpion/dependency/argument_dependency.rb
scorpion-ioc-1.0.2 lib/scorpion/dependency/argument_dependency.rb
scorpion-ioc-1.0.1 lib/scorpion/dependency/argument_dependency.rb
scorpion-ioc-1.0.0 lib/scorpion/dependency/argument_dependency.rb