Sha256: 22e9beba74c129f8322602b728dcc7bfb918f957ee14c87214047c7f5c96372f
Contents?: true
Size: 648 Bytes
Versions: 41
Compression:
Stored size: 648 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 def equal?(other) @title == other.title end # Outputs section title def to_s @title end # @private def inspect %(#<Doing::Section @title="#{@title}" @original="#{@original}">) end end end
Version data entries
41 entries across 41 versions & 1 rubygems