Class: Mbeditor::GitCommitDetailService
- Inherits:
-
Object
- Object
- Mbeditor::GitCommitDetailService
- Includes:
- GitService
- Defined in:
- app/services/mbeditor/git_commit_detail_service.rb
Constant Summary
Constants included from GitService
Mbeditor::GitService::SAFE_GIT_REF
Instance Attribute Summary collapse
-
#repo_path ⇒ Object
readonly
Returns the value of attribute repo_path.
-
#sha ⇒ Object
readonly
Returns the value of attribute sha.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(repo_path:, sha:) ⇒ GitCommitDetailService
constructor
A new instance of GitCommitDetailService.
Methods included from GitService
ahead_behind, current_branch, find_branch_base, parse_git_log, parse_git_log_with_parents, parse_name_status, parse_numstat, parse_porcelain_status, resolve_path, run_git, upstream_branch
Constructor Details
#initialize(repo_path:, sha:) ⇒ GitCommitDetailService
Returns a new instance of GitCommitDetailService.
9 10 11 12 |
# File 'app/services/mbeditor/git_commit_detail_service.rb', line 9 def initialize(repo_path:, sha:) @repo_path = repo_path.to_s @sha = sha.to_s end |
Instance Attribute Details
#repo_path ⇒ Object (readonly)
Returns the value of attribute repo_path.
7 8 9 |
# File 'app/services/mbeditor/git_commit_detail_service.rb', line 7 def repo_path @repo_path end |
#sha ⇒ Object (readonly)
Returns the value of attribute sha.
7 8 9 |
# File 'app/services/mbeditor/git_commit_detail_service.rb', line 7 def sha @sha end |
Instance Method Details
#call ⇒ Object
14 15 16 17 |
# File 'app/services/mbeditor/git_commit_detail_service.rb', line 14 def call = { "sha" => sha, "title" => ["title"], "author" => ["author"], "date" => ["date"], "files" => fetch_files } end |