Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/is_same/core_ext.rb
Instance Method Summary collapse
Instance Method Details
#matching?(object = nil, &block) ⇒ Boolean
2 3 4 5 6 7 8 9 |
# File 'lib/is_same/core_ext.rb', line 2 def matching? object=nil, &block if object.is_a?(Proc) or block object ||= block object.call(self) else self == object end end |