Class: Branchtree::Branch::Info
- Inherits:
-
Object
- Object
- Branchtree::Branch::Info
- Defined in:
- lib/branchtree/branch.rb
Instance Attribute Summary collapse
-
#ahead_of_parent ⇒ Object
readonly
Returns the value of attribute ahead_of_parent.
-
#ahead_of_upstream ⇒ Object
readonly
Returns the value of attribute ahead_of_upstream.
-
#behind_parent ⇒ Object
readonly
Returns the value of attribute behind_parent.
-
#behind_upstream ⇒ Object
readonly
Returns the value of attribute behind_upstream.
-
#upstream ⇒ Object
readonly
Returns the value of attribute upstream.
Instance Method Summary collapse
- #empty? ⇒ Boolean
- #has_upstream? ⇒ Boolean
-
#initialize(branch:, ahead_of_parent:, behind_parent:, upstream:, ahead_of_upstream:, behind_upstream:) ⇒ Info
constructor
A new instance of Info.
- #populate ⇒ Object
- #repopulate ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(branch:, ahead_of_parent:, behind_parent:, upstream:, ahead_of_upstream:, behind_upstream:) ⇒ Info
Returns a new instance of Info.
164 165 166 167 168 169 170 171 |
# File 'lib/branchtree/branch.rb', line 164 def initialize(branch:, ahead_of_parent:, behind_parent:, upstream:, ahead_of_upstream:, behind_upstream:) @branch = branch @ahead_of_parent = ahead_of_parent @behind_parent = behind_parent @upstream = upstream @ahead_of_upstream = ahead_of_upstream @behind_upstream = behind_upstream end |
Instance Attribute Details
#ahead_of_parent ⇒ Object (readonly)
Returns the value of attribute ahead_of_parent.
173 174 175 |
# File 'lib/branchtree/branch.rb', line 173 def ahead_of_parent @ahead_of_parent end |
#ahead_of_upstream ⇒ Object (readonly)
Returns the value of attribute ahead_of_upstream.
173 174 175 |
# File 'lib/branchtree/branch.rb', line 173 def ahead_of_upstream @ahead_of_upstream end |
#behind_parent ⇒ Object (readonly)
Returns the value of attribute behind_parent.
173 174 175 |
# File 'lib/branchtree/branch.rb', line 173 def behind_parent @behind_parent end |
#behind_upstream ⇒ Object (readonly)
Returns the value of attribute behind_upstream.
173 174 175 |
# File 'lib/branchtree/branch.rb', line 173 def behind_upstream @behind_upstream end |
#upstream ⇒ Object (readonly)
Returns the value of attribute upstream.
173 174 175 |
# File 'lib/branchtree/branch.rb', line 173 def upstream @upstream end |
Instance Method Details
#empty? ⇒ Boolean
175 176 177 |
# File 'lib/branchtree/branch.rb', line 175 def empty? false end |
#has_upstream? ⇒ Boolean
183 184 185 |
# File 'lib/branchtree/branch.rb', line 183 def has_upstream? @upstream != "" end |
#populate ⇒ Object
187 188 189 |
# File 'lib/branchtree/branch.rb', line 187 def populate self end |
#repopulate ⇒ Object
191 192 193 |
# File 'lib/branchtree/branch.rb', line 191 def repopulate NullInfo.new(@branch).populate end |
#valid? ⇒ Boolean
179 180 181 |
# File 'lib/branchtree/branch.rb', line 179 def valid? true end |