Class: Hotspots::Repository::GitCommand::Show

Inherits:
Object
  • Object
show all
Defined in:
lib/hotspots/repository/git_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Show

Returns a new instance of Show.


28
29
30
# File 'lib/hotspots/repository/git_command.rb', line 28

def initialize(options)
  @commit_hash = options[:commit_hash]
end

Instance Attribute Details

#commit_hashObject (readonly)

Returns the value of attribute commit_hash.


26
27
28
# File 'lib/hotspots/repository/git_command.rb', line 26

def commit_hash
  @commit_hash
end

Instance Method Details

#to_sObject


32
33
34
# File 'lib/hotspots/repository/git_command.rb', line 32

def to_s
  "git show --oneline --name-only #{commit_hash}"
end