Class: Git::StashInfo
- Inherits:
-
Data
- Object
- Data
- Git::StashInfo
- Defined in:
- lib/git/stash_info.rb
Overview
Immutable value object representing stash entry information
StashInfo encapsulates the parsed data from git stash list output.
Each entry contains comprehensive information about the stash including
its index, reference name, commit SHA, branch, message, author/committer
details, and timestamps.
Instance Attribute Summary collapse
-
#author_date ⇒ String
readonly
The author date in ISO 8601 format.
-
#author_email ⇒ String
readonly
The email of the stash author.
-
#author_name ⇒ String
readonly
The name of the stash author.
-
#branch ⇒ String?
readonly
The branch name where the stash was created, or nil for custom stash messages.
-
#committer_date ⇒ String
readonly
The committer date in ISO 8601 format.
-
#committer_email ⇒ String
readonly
The email of the stash committer.
-
#committer_name ⇒ String
readonly
The name of the stash committer.
-
#index ⇒ Integer
readonly
The stash index (0, 1, 2, ...).
-
#message ⇒ String
readonly
The stash message (e.g., 'WIP on main: abc123 commit msg').
-
#name ⇒ String
readonly
The stash reference name (e.g., 'stash@{0\}').
-
#oid ⇒ String
readonly
The full 40-character object identifier of the stash.
-
#short_oid ⇒ String
readonly
The abbreviated object identifier (typically 7 characters).
Instance Method Summary collapse
-
#to_s ⇒ String
Returns the stash reference name.
Instance Attribute Details
#author_date ⇒ String (readonly)
Returns the author date in ISO 8601 format.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#author_email ⇒ String (readonly)
Returns the email of the stash author.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#author_name ⇒ String (readonly)
Returns the name of the stash author.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#branch ⇒ String? (readonly)
Returns the branch name where the stash was created, or nil for custom stash messages.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#committer_date ⇒ String (readonly)
Returns the committer date in ISO 8601 format.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#committer_email ⇒ String (readonly)
Returns the email of the stash committer.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#committer_name ⇒ String (readonly)
Returns the name of the stash committer.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#index ⇒ Integer (readonly)
Returns the stash index (0, 1, 2, ...).
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#message ⇒ String (readonly)
Returns the stash message (e.g., 'WIP on main: abc123 commit msg').
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#name ⇒ String (readonly)
Returns the stash reference name (e.g., 'stash@{0\}').
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#oid ⇒ String (readonly)
Returns the full 40-character object identifier of the stash.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
#short_oid ⇒ String (readonly)
Returns the abbreviated object identifier (typically 7 characters).
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/git/stash_info.rb', line 80 StashInfo = Data.define( :index, :name, :oid, :short_oid, :branch, :message, :author_name, :author_email, :author_date, :committer_name, :committer_email, :committer_date ) do # Returns the stash reference name # # @example Convert to string # info.to_s # => 'stash@{0}' # # @return [String] the stash name (e.g., 'stash@\\{0}') def to_s name end end |
Instance Method Details
#to_s ⇒ String
Returns the stash reference name
100 101 102 |
# File 'lib/git/stash_info.rb', line 100 def to_s name end |