struct

Keep::Action

Inherits Struct < Value < Object

One effect inside a commit: a name and positional fields. A field is a string or a flat list of strings (a nested C0 scope). Numbers travel as text; an empty string is the absence of a value.

Constructors

new(name : String, fields : Array(Field) = [] of Field)
Source
new(name : String, *args) : Action

Build from loose arguments: strings, numbers, nil (→ ""), or lists.

Source

Class methods

field(value) : Field
Source

Instance methods

[](i : Int32) : String

Field i as a string. Raises if it's a list.

Source
[]?(i : Int32) : String | Nil

Field i as a string, nil when absent or empty.

Source
fields
Source
list(i : Int32) : Array(String)

Field i as a list (a string field becomes a one-element list; an empty one, an empty list).

Source
name
Source
size
Source
to_s(io : IO) : Nil

Same as #inspect(io).

Source

Nested types