Class: Hotspots::Repository::Command::Git::Show

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Show

Returns a new instance of Show.



29
30
31
# File 'lib/hotspots/repository/command/git.rb', line 29

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

Instance Attribute Details

#commit_hashObject (readonly)

Returns the value of attribute commit_hash.



27
28
29
# File 'lib/hotspots/repository/command/git.rb', line 27

def commit_hash
  @commit_hash
end

Instance Method Details

#buildObject



33
34
35
# File 'lib/hotspots/repository/command/git.rb', line 33

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