File: symbol.rb

package info (click to toggle)
ruby-extlib 0.9.16-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 576 kB
  • sloc: ruby: 7,014; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 416 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Symbol

  def try_dup
    self
  end

  ##
  # Join with _o_ as a file path
  #
  #   :merb/"core_ext"              #=> "merb/core_ext"
  #   :merb / :core_ext / :string   #=> "merb/core_ext/string"
  #
  # @param [#to_s] o The path component(s) to append.
  #
  # @return [String] The receiver (as path string), concatenated with _o_.
  #
  # @api public
  def /(o)
    File.join(self.to_s, o.to_s)
  end
end