Sha256: 858d46cfe48f5211b861f6cd9f216ca521850e48b9de4ccf3d40ca40022fc110

Contents?: true

Size: 434 Bytes

Versions: 4

Compression:

Stored size: 434 Bytes

Contents

#          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the Ruby license.

# A convenient way to do File.join
#
# Example:
#   'a' / 'b'                      # -> 'a/b'
#   File.dirname(__FILE__) / 'bar' # -> "ramaze/snippets/string/bar"

class String
  def / obj
    File.join(self, obj.to_s)
  end
end

class Symbol
  def / obj
    self.to_s / obj
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ramaze-0.3.0 lib/ramaze/snippets/divide.rb
ramaze-0.3.5 lib/ramaze/snippets/divide.rb
ramaze-0.3.9 lib/ramaze/snippets/divide.rb
ramaze-0.3.9.1 lib/ramaze/snippets/divide.rb