Sha256: 00a36168cfb2be1cdb0ef2cf812f8399ff66e698d03c183e136557aaf26d64a2
Contents?: true
Size: 589 Bytes
Versions: 11
Compression:
Stored size: 589 Bytes
Contents
# frozen_string_literal: true module Doing # Section Object class Section attr_accessor :original, :title def initialize(title, original: nil) super() @title = title @original = if original.nil? "#{title}:" else original =~ /:(\s+@[^ (]+(\([^)]*\))?)*?$/ ? original : "#{original}:" end end # Outputs section title def to_s @title end # @private def inspect %(#<Doing::Section @title="#{@title}" @original="#{@original}">) end end end
Version data entries
11 entries across 11 versions & 1 rubygems