Method: Indexer::Version::Number#each

Defined in:
lib/indexer/version/number.rb

#each(&block) ⇒ Object

Iterate of each segment of the version. This allows all enumerable methods to be used.

Version::Number[1,2,3].map{|i| i + 1}
#=> [2,3,4]

Though keep in mind that the state segment is not a number (and techincally any segment can be a string instead of an integer).



284
285
286
# File 'lib/indexer/version/number.rb', line 284

def each(&block)
  @tuple.each(&block)
end