Class: Scorpion::Dependency::ArgumentDependency
- Inherits:
-
Scorpion::Dependency
- Object
- Scorpion::Dependency
- Scorpion::Dependency::ArgumentDependency
- Defined in:
- lib/scorpion/dependency/argument_dependency.rb
Overview
Scorpion::Dependency for an captured argument.
Instance Attribute Summary collapse
-
#argument ⇒ Object
readonly
Returns the value of attribute argument.
Attributes inherited from Scorpion::Dependency
Instance Method Summary collapse
- #fetch(*args) ⇒ Object
-
#initialize(argument) ⇒ ArgumentDependency
constructor
A new instance of ArgumentDependency.
- #satisfies?(contract) ⇒ Boolean
Methods inherited from Scorpion::Dependency
#==, define, #hash, #inspect, #release, #replicate
Constructor Details
#initialize(argument) ⇒ ArgumentDependency
Returns a new instance of ArgumentDependency.
11 12 13 |
# File 'lib/scorpion/dependency/argument_dependency.rb', line 11 def initialize( argument ) @argument = argument end |
Instance Attribute Details
#argument ⇒ Object (readonly)
Returns the value of attribute argument.
9 10 11 |
# File 'lib/scorpion/dependency/argument_dependency.rb', line 9 def argument @argument end |
Instance Method Details
#fetch(*args) ⇒ Object
15 16 17 |
# File 'lib/scorpion/dependency/argument_dependency.rb', line 15 def fetch( *args ) argument end |
#satisfies?(contract) ⇒ Boolean
19 20 21 |
# File 'lib/scorpion/dependency/argument_dependency.rb', line 19 def satisfies?( contract ) contract === argument end |