Class: Contracts::Builtin::KeywordArgs
- Inherits:
-
CallableClass
- Object
- CallableClass
- Contracts::Builtin::KeywordArgs
- Defined in:
- 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.
444 445 446 447 |
# File 'lib/contracts/builtin_contracts.rb', line 444 def initialize() super() @options = end |
Instance Method Details
#inspect ⇒ Object
462 463 464 |
# File 'lib/contracts/builtin_contracts.rb', line 462 def inspect to_s end |
#to_s ⇒ Object
458 459 460 |
# File 'lib/contracts/builtin_contracts.rb', line 458 def to_s "KeywordArgs[#{}]" end |