Sha256: 0d5c44fe212af5d5133748e4cdf1c5da6fc4f79d4ad36f4f8f1ea19fe7a69628

Contents?: true

Size: 198 Bytes

Versions: 11

Compression:

Stored size: 198 Bytes

Contents

class Module
  # useful in the following scenario:
  #   things.select(&:Array.type?)
  # instead of:
  #   things.select { |x| x.is_a?(Array) }
  def type?
    proc { |x| x.is_a?(self) }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
abstractivator-0.20.0 lib/abstractivator/module_ext.rb
abstractivator-0.19.0 lib/abstractivator/module_ext.rb
abstractivator-0.18.0 lib/abstractivator/module_ext.rb
abstractivator-0.17.0 lib/abstractivator/module_ext.rb
abstractivator-0.16.0 lib/abstractivator/module_ext.rb
abstractivator-0.15.0 lib/abstractivator/module_ext.rb
abstractivator-0.14.0 lib/abstractivator/module_ext.rb
abstractivator-0.13.0 lib/abstractivator/module_ext.rb
abstractivator-0.12.0 lib/abstractivator/module_ext.rb
abstractivator-0.11.0 lib/abstractivator/module_ext.rb
abstractivator-0.10.0 lib/abstractivator/module_ext.rb