class MultiSync::Source

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/multi_sync/source.rb, line 17
def initialize(*args)
  super
rescue Virtus::CoercionError => e
  raise ArgumentError, e.message
end

Private Instance Methods

path_to_local_resource(path, options = {}) click to toggle source
# File lib/multi_sync/source.rb, line 25
def path_to_local_resource(path, options = {})
  pathname = Pathname.new(path)
  path_options = { path_with_root: pathname, path_without_root: pathname.relative_path_from(source_dir).cleanpath }
  MultiSync::LocalResource.new(path_options.merge(options).merge(resource_options))
end