Class: Avm::Scms::AutoCommit::FileResourceName

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/scms/auto_commit/file_resource_name.rb

Instance Method Summary collapse

Instance Method Details

#class_nameObject



16
17
18
# File 'lib/avm/scms/auto_commit/file_resource_name.rb', line 16

def class_name
  file_format.file_resource_name(relative_path)
end

#commit_messageObject



20
21
22
23
24
# File 'lib/avm/scms/auto_commit/file_resource_name.rb', line 20

def commit_message
  r = class_name
  r += ': remove' unless path.file?
  "#{r}."
end

#relative_pathObject



26
27
28
# File 'lib/avm/scms/auto_commit/file_resource_name.rb', line 26

def relative_path
  path.expand_path.relative_path_from(source_root.expand_path)
end