Class: Contracts::Builtin::KeywordArgs
- Inherits:
-
CallableClass
- Object
- CallableClass
- Contracts::Builtin::KeywordArgs
- Defined in:
- lib/contracts-ruby2/lib/contracts/builtin_contracts.rb,
lib/contracts-ruby3/lib/contracts/builtin_contracts.rb
Overview
Use this for specifying contracts for keyword arguments Example: KeywordArgs[ e: Range, f: Optional[Num] ]
Instance Method Summary collapse
-
#initialize(options) ⇒ KeywordArgs
constructor
A new instance of KeywordArgs.
- #inspect ⇒ Object
- #to_s ⇒ Object
- #valid?(hash) ⇒ Boolean
Methods inherited from CallableClass
Constructor Details
#initialize(options) ⇒ KeywordArgs
Returns a new instance of KeywordArgs.
419 420 421 |
# File 'lib/contracts-ruby2/lib/contracts/builtin_contracts.rb', line 419 def initialize() @options = end |
Instance Method Details
#inspect ⇒ Object
435 436 437 |
# File 'lib/contracts-ruby2/lib/contracts/builtin_contracts.rb', line 435 def inspect to_s end |
#to_s ⇒ Object
431 432 433 |
# File 'lib/contracts-ruby2/lib/contracts/builtin_contracts.rb', line 431 def to_s "KeywordArgs[#{}]" end |