No commit activity in last 3 years
No release in over 3 years
Add `Method#===`
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.14
>= 0
~> 3.0
 Project Readme

ProcedureableMethod

Add Method#===.

Installation

Add this line to your application's Gemfile:

gem 'procedureable_method'

And then execute:

$ bundle

Or install it yourself as:

$ gem install procedureable_method

Usage

require "procedureable_method"
using ProcedureableMethod
# or only
# require "procedureable_method/core_ext"

def func value
	case value
	when 1.method(:<=)
		"plus"
	when -1.method(:>=)
		"minus"
	when 0.method(:==)
		"zero"
	end
end

func 3   # => "plus"
func -6  # => "minus"
func 0   # => "zero"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/osyo-manga/gem-procedureable_method.