Class: KKGit::GitOps::Status
- Inherits:
-
Struct
- Object
- Struct
- KKGit::GitOps::Status
- Defined in:
- lib/kk/git/git_ops.rb
Overview
仓库同步状态快照
Instance Attribute Summary collapse
-
#ahead ⇒ Object
Returns the value of attribute ahead.
-
#behind ⇒ Object
Returns the value of attribute behind.
-
#branch ⇒ Object
Returns the value of attribute branch.
-
#clean ⇒ Object
Returns the value of attribute clean.
-
#detached ⇒ Object
Returns the value of attribute detached.
-
#remote ⇒ Object
Returns the value of attribute remote.
-
#upstream_configured ⇒ Object
Returns the value of attribute upstream_configured.
Instance Method Summary collapse
Instance Attribute Details
#ahead ⇒ Object
Returns the value of attribute ahead
22 23 24 |
# File 'lib/kk/git/git_ops.rb', line 22 def ahead @ahead end |
#behind ⇒ Object
Returns the value of attribute behind
22 23 24 |
# File 'lib/kk/git/git_ops.rb', line 22 def behind @behind end |
#branch ⇒ Object
Returns the value of attribute branch
22 23 24 |
# File 'lib/kk/git/git_ops.rb', line 22 def branch @branch end |
#clean ⇒ Object
Returns the value of attribute clean
22 23 24 |
# File 'lib/kk/git/git_ops.rb', line 22 def clean @clean end |
#detached ⇒ Object
Returns the value of attribute detached
22 23 24 |
# File 'lib/kk/git/git_ops.rb', line 22 def detached @detached end |
#remote ⇒ Object
Returns the value of attribute remote
22 23 24 |
# File 'lib/kk/git/git_ops.rb', line 22 def remote @remote end |
#upstream_configured ⇒ Object
Returns the value of attribute upstream_configured
22 23 24 |
# File 'lib/kk/git/git_ops.rb', line 22 def upstream_configured @upstream_configured end |
Instance Method Details
#behind_remote? ⇒ Boolean
35 36 37 |
# File 'lib/kk/git/git_ops.rb', line 35 def behind_remote? behind.positive? end |
#needs_sync? ⇒ Boolean
27 28 29 |
# File 'lib/kk/git/git_ops.rb', line 27 def needs_sync? ahead.positive? || behind.positive? end |
#unpushed? ⇒ Boolean
31 32 33 |
# File 'lib/kk/git/git_ops.rb', line 31 def unpushed? ahead.positive? end |