Sha256: e6116bca03205b9401792565607bf0dd7077517fcdd3591f8bde603d1e6e1348

Contents?: true

Size: 284 Bytes

Versions: 12

Compression:

Stored size: 284 Bytes

Contents

require 'facets/functor'

class Symbol

  # Convert symbol to string, apply string method
  # and convert back to symbol via a fluent
  # interface.
  #
  #   :HELLO.re_s.downcase
  #
  def re_s
    @re_s ||= Functor.new do |op, *a|
      to_s.send(op, *a).to_sym
    end
  end

end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
facets-2.8.4 lib/core/facets/symbol/re_s.rb
facets-2.8.3 lib/core/facets/symbol/re_s.rb
facets-2.8.2 lib/core/facets/symbol/re_s.rb
facets-2.8.1 lib/core/facets/symbol/re_s.rb
facets-2.8.0 lib/core/facets/symbol/re_s.rb
facets-2.7.0 lib/core/facets/symbol/re_s.rb
facets-2.6.0 lib/core/facets/symbol/re_s.rb
facets-2.5.0 lib/core/facets/symbol/re_s.rb
facets-2.4.5 lib/core/facets/symbol/re_s.rb
facets-2.5.1 lib/core/facets/symbol/re_s.rb
facets-2.5.2 lib/core/facets/symbol/re_s.rb
mack-facets-0.8.2 lib/gems/facets-2.4.5/lib/core/facets/symbol/re_s.rb