class Rodot::Dotfile

Dotfile model. Manage source dotfile and dest dotfile.

Constants

STATUS_ENUM

Attributes

dest[RW]
source[RW]

Public Class Methods

new(source, dest) click to toggle source
# File lib/rodot/dotfile.rb, line 16
def initialize(source, dest)
  @source = source
  @dest = dest
end

Public Instance Methods

dest_exist?() click to toggle source
# File lib/rodot/dotfile.rb, line 25
def dest_exist?
  File.exist?(@dest)
end
linked?() click to toggle source
# File lib/rodot/dotfile.rb, line 33
def linked?
  false unless source_exist? && dest_exist?
  false unless source_symlink?
  File.readlink(source) == @dest
end
source_exist?() click to toggle source
# File lib/rodot/dotfile.rb, line 21
def source_exist?
  File.exist?(@source)
end
status() click to toggle source
# File lib/rodot/dotfile.rb, line 39
def status
  source_exists = source_exist?
  desc_exists = dest_exist?

  if source_exists && desc_exists
  end
end