Class: Descriptor::MergePoint::List
Instance Method Summary collapse
- #add(mp) ⇒ Object
- #first ⇒ Object
-
#initialize ⇒ List
constructor
A new instance of List.
- #step! ⇒ Object
Constructor Details
#initialize ⇒ List
Returns a new instance of List.
173 174 175 |
# File 'lib/rui/descriptor.rb', line 173 def initialize @mps = [] end |
Instance Method Details
#add(mp) ⇒ Object
181 182 183 |
# File 'lib/rui/descriptor.rb', line 181 def add(mp) @mps << mp end |
#first ⇒ Object
177 178 179 |
# File 'lib/rui/descriptor.rb', line 177 def first @mps.first end |
#step! ⇒ Object
185 186 187 188 189 190 191 192 |
# File 'lib/rui/descriptor.rb', line 185 def step! raise "Stepping invalid merge point list" if @mps.empty? @mps.each do |mp| mp.position += 1 end @mps.first.count -= 1 clean! end |