0.0
No commit activity in last 3 years
No release in over 3 years
String?("Hello") Interrogate attempts to bring Scheme-like class predication to Ruby. It provides an alternate syntax using Module#===
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0

Runtime

>= 0
 Project Readme

Interrogate Build Status

Interrogate attempts to bring Scheme-like class predication to Ruby. It provides an alternate syntax using Module#===.

>> require "interrogate"
>> String?("Hello")
>> trues
>> Symbol?(:World)
>> true
>> Float?(1.0)
>> true

You can "interrogate" multiple objects as well:

>> String?("Hello", :World, 1.0)
>> false
>> String?("Hello", "World", "1.0")
>> true

And you can "interrogate" the return value of a block:

>> num = 1
>> String?("Hello") { num }
>> false
>> String?("Hello") { num.to_s }
>> true

Feedback

Use that Github issue tracker!