Class: Avm::Git::AutoCommitPath

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/git/auto_commit_path.rb,
lib/avm/git/auto_commit_path/ruby.rb

Defined Under Namespace

Modules: Ruby

Instance Method Summary collapse

Instance Method Details

#class_nameObject



13
14
15
# File 'lib/avm/git/auto_commit_path.rb', line 13

def class_name
  ruby_class_name || relative_path.to_path
end

#commit_messageObject



17
18
19
20
21
# File 'lib/avm/git/auto_commit_path.rb', line 17

def commit_message
  r = class_name
  r += ': remove' unless path.file?
  r + '.'
end

#relative_pathObject



23
24
25
# File 'lib/avm/git/auto_commit_path.rb', line 23

def relative_path
  path.relative_path_from(git.root_path)
end