Sha256: 028c5002fd6b0669cc47c5e5247853477e729a324adc62b2526954ef6558290c

Contents?: true

Size: 286 Bytes

Versions: 8

Compression:

Stored size: 286 Bytes

Contents

# encoding: utf-8

# Array
class Array
  # alias of map(&:method_symbol)
  #
  # === Example
  #
  #   [*'a'..'c']>>:ord # => [97, 98, 99]
  #
  def >>(method_name)
    return self unless [Symbol, String].include? method_name.class
    map(&method_name.to_sym)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tbpgr_utils-0.0.123 lib/open_classes/array/gte_gte.rb
tbpgr_utils-0.0.122 lib/open_classes/array/gte_gte.rb
tbpgr_utils-0.0.121 lib/open_classes/array/gte_gte.rb
tbpgr_utils-0.0.120 lib/open_classes/array/gte_gte.rb
tbpgr_utils-0.0.119 lib/open_classes/array/gte_gte.rb
tbpgr_utils-0.0.118 lib/open_classes/array/gte_gte.rb
tbpgr_utils-0.0.117 lib/open_classes/array/gte_gte.rb
tbpgr_utils-0.0.116 lib/open_classes/array/gte_gte.rb