Share

WSCommits

A collection of WSCommit objects, representing the commit history of a WSModelObject using merge version control.

Methods:

[] (Get Index)

#[(index)] ⇒ WSCommit?

EXCHANGE

Returns the WSCommit from the collection at the specified index.

Parameters

Name Type(s) Description
index Integer The index requested (zero-based).
Return WSCommit, nil The wscommit found, or nil if there is no object at this index.

each

#each { |c| ... } ⇒ WSCommit

EXCHANGE

Iterates through the collection, yielding a WSCommit.

commits.each { |c| puts c.branch_id }
commits.each.each do |c|
  puts "#{c.branch_id} - User '#{c.user}' changed #{c.modified_count} objects!"
end

length

#length ⇒ Integer

EXCHANGE

Returns the length of this collection i.e. how many WSCommits it contains.

Parameters

Name Type(s) Description
Return Integer

Was this information helpful?