Sha256: 6033801960502310ebc8b9a5227d1ece95e3f8b955054835c9779e74a38961ad

Contents?: true

Size: 473 Bytes

Versions: 27

Compression:

Stored size: 473 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, traits = nil )
        contract === argument && traits.blank?
      end

    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

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