lib/pdd/source.rb
# Fetch puzzle tail (all lines after the first one)
Fetch puzzle tail (all lines after the first one)
Fetch puzzle tail ( all lines after the first one )
def tail(lines, prefix, start)
      lines
        .take_while { |t| match_markers(t).none? && t.start_with?(prefix) }
        .map { |t| t[prefix.length, t.length] }
        .take_while { |t| t =~ /^[ a-zA-Z0-9]/ }
        .each_with_index do |t, i|
        next if t.start_with?(' ')
        raise Error, "Space expected at #{start + i + 2}:#{prefix.length}; \
make sure all lines in the puzzle body have a single leading space."
      end
        .map { |t| t[1, t.length] }
    end
def tail ( lines , prefix , start ) lines . take_while { | t | match_markers ( t ) . none? && t . start_with? ( prefix ) } . map { | t | t [ prefix . length , t . length ] } . take_while { | t | t =~ / ^[ a-zA-Z0-9] / } . each_with_index do | t , i | next if t . start_with? ( ' ' ) raise Error , "Space expected at #{start + i + 2}:#{prefix.length}; \
make sure all lines in the puzzle body have a single leading space." end . map { | t | t [ 1 , t . length ] } end
Fetch puzzle tail (all lines after the first one)
Fetch puzzle tail ( all lines after the first one )
lines
<not_specific>
prefix
<not_specific>
start
<not_specific>