lib/core/facets/file/ext.rb in facets-2.8.4 vs lib/core/facets/file/ext.rb in facets-2.9.0.pre.1

- old
+ new

@@ -7,19 +7,19 @@ # #extname it does not include the dot prefix. # # With a new extension argument, changes the exension of the file # name to the new extension and returns it. # - # Examples: + # Examples # - # File.ext('file.rb') => 'rb' - # File.ext('file.rb', 'txt') => 'file.txt' - # File.ext('file.rb', '.txt') => 'file.txt' - # File.ext('file.rb', '') => 'file' + # File.ext('file.rb') # => 'rb' + # File.ext('file.rb', 'txt') # => 'file.txt' + # File.ext('file.rb', '.txt') # => 'file.txt' + # File.ext('file.rb', '') # => 'file' # - # This method can be used with String#file for more object-oriented notation. + # This method can be used with String#file for more object-oriented notation: # - # 'file.rb'.file.ext('txt') => 'file.txt' + # 'file.rb'.file.ext('txt') # => 'file.txt' # # CREDIT: Lavir the Whiolet def self.ext(filename, new_ext=nil) old_ext = extname(filename)