Method: Linguist::FileBlob#initialize
- Defined in:
- lib/linguist/file_blob.rb
#initialize(path, base_path = nil) ⇒ FileBlob
Public: Initialize a new FileBlob from a path
path - A path String that exists on the file system. base_path - Optional base to relativize the path
Returns a FileBlob.
17 18 19 20 |
# File 'lib/linguist/file_blob.rb', line 17 def initialize(path, base_path = nil) @fullpath = path @path = base_path ? path.sub("#{base_path}/", '') : path end |