Sha256: 4ea549ace9f43dea892da813092bb507431c37aa6b0e862ccce661c65d1685e8
Contents?: true
Size: 565 Bytes
Versions: 10
Compression:
Stored size: 565 Bytes
Contents
# frozen_string_literal: true Asciidoctor::AbstractBlock.prepend (Module.new do def empty? blocks.empty? end def first_child blocks[0] end def last_child blocks[-1] end def first_child? self == parent.blocks[0] end def last_child? self == parent.blocks[-1] end def next_sibling (siblings = parent.blocks)[(siblings.index self) + 1] end def previous_sibling (self_idx = (siblings = parent.blocks).index self) > 0 ? siblings[self_idx - 1] : nil end def remove parent.blocks.delete self end end)
Version data entries
10 entries across 10 versions & 1 rubygems