class Agate::SubmoduleCollection

Overview

A collection of submodule names in a repository.

NOTE Does not include Enumerable because the C callback used by git_submodule_foreach is incompatible with Crystal's yield-through semantics (Box closure + C callback). Provides #each(&block) and #to_a instead.

Defined in:

agate/submodule.cr

Instance Method Summary

Instance Method Detail

def [](name : String) : Submodule #

Looks up a submodule by name. Raises on failure.


[View source]
def []?(name : String) : Submodule | Nil #

Looks up a submodule by name, returning nil if not found.


[View source]
def each(&block : String -> ) : Nil #

Iterates over all submodule names.


[View source]
def to_a : Array(String) #

Returns all submodule names as an array.


[View source]