class TeXzip::Project::FilePath
Public Class Methods
new(root_dir, file)
click to toggle source
# File lib/texzip/Project.rb, line 20 def initialize(root_dir, file) @root_dir = Pathname.new(root_dir).expand_path @file = Pathname.new(file) @file = @root_dir.join(file).expand_path.relative_path_from(@root_dir) @out_file = @file end
Public Instance Methods
eql?(other)
click to toggle source
# File lib/texzip/Project.rb, line 60 def eql?(other) path.to_s.eql? other.path.to_s end
extname()
click to toggle source
# File lib/texzip/Project.rb, line 52 def extname @file.extname end
file()
click to toggle source
# File lib/texzip/Project.rb, line 36 def file @file end
hash()
click to toggle source
# File lib/texzip/Project.rb, line 56 def hash path.to_s.hash end
out_file=(file)
click to toggle source
# File lib/texzip/Project.rb, line 40 def out_file=(file) @out_file = Pathname.new(file) end
output_path()
click to toggle source
# File lib/texzip/Project.rb, line 44 def output_path @out_dir.join(@out_file).expand_path end
path()
click to toggle source
# File lib/texzip/Project.rb, line 48 def path @root_dir.join(@file).expand_path end
set_output_directory(dir)
click to toggle source
# File lib/texzip/Project.rb, line 27 def set_output_directory(dir) @out_dir = Pathname.new(dir).expand_path end
set_plain_output_directory(dir)
click to toggle source
# File lib/texzip/Project.rb, line 31 def set_plain_output_directory(dir) set_output_directory dir @out_file = @file.basename end