Registry / utility / constrain

constrain

JSON →
library0.10.0rbrubygemsunverified

Allows checking if an object matches a class expression, typically used to validate method parameter types dynamically.

gem install constrain
INSTALL
IMPORT
SIG · CONSTRAIN
C
constrain
utilityrubyv0.10.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Constrain
✓ require 'constrain'

Validates that the parameter is a String using constrain.

require 'constrain' include Constrain def greet(name) constrain name, String "Hello, #{name}!" end puts greet('World')
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.10.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
constrain — gem install constrain · libregistry