Sha256: 968350e008239ef1647173c8a2d63bc1529a075123d4abad7659880512c23a9d

Contents?: true

Size: 583 Bytes

Versions: 6

Compression:

Stored size: 583 Bytes

Contents

# Utility methods mixed into String.
    
class String
  
  # Syntactic sugar for using File.join to concatenate the argument to the receiver.
  #
  #   require "lib" / "utilities" / "string"
  #
  # The idea is not original, but we can't remember where we first saw it.
  # Waves::Ext::Symbol defines the same method, allowing for :files / 'afilename.txt'
  #
  
  def / ( s ) ; File.join( self, s.to_s ); end
  
  alias_method :lower_camel_case, :subcamelcase
  alias_method :camel_case, :camelcase
  alias_method :snake_case, :snakecase
  alias_method :title_case, :titlecase

end

Version data entries

6 entries across 6 versions & 4 rubygems

Version Path
dyoder-waves-0.8.0 lib/ext/string.rb
waves-edge-2009.03.10.13.14 lib/ext/string.rb
waves-stable-2009.3.10 lib/ext/string.rb
waves-0.8.0 lib/ext/string.rb
waves-0.8.1 lib/ext/string.rb
waves-0.8.2 lib/ext/string.rb