Class: Avm::Sources::AutoCommit::ForFile

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/sources/auto_commit/for_file.rb

Instance Method Summary collapse

Instance Method Details

#path_for_auto_commitPathname

Returns:

  • (Pathname)


14
15
16
# File 'lib/avm/sources/auto_commit/for_file.rb', line 14

def path_for_auto_commit
  path.relative_path_from(source_for_auto_commit.path)
end

#scm_auto_commitAvm::Scms::AutoCommit::ForFile



19
20
21
22
# File 'lib/avm/sources/auto_commit/for_file.rb', line 19

def scm_auto_commit
  ::Avm::Scms::AutoCommit::ForFile.new(source_for_auto_commit.scm, path_for_auto_commit,
                                       rules)
end

#source_for_auto_commitAvm::Sources::Base

Returns:



25
26
27
# File 'lib/avm/sources/auto_commit/for_file.rb', line 25

def source_for_auto_commit
  source.sub_for_path(path) || source
end