class Doing::Section

Section Object

Attributes

original[RW]
title[RW]

Public Class Methods

new(title, original: nil) click to toggle source
Calls superclass method
# File lib/doing/section.rb, line 8
def initialize(title, original: nil)
  super()

  @title = title

  @original = if original.nil?
                "#{title}:"
              else
                original =~ /:(\s+@[^ (]+(\([^)]*\))?)*?$/ ? original : "#{original}:"
              end
end

Public Instance Methods

equal?(other) click to toggle source
# File lib/doing/section.rb, line 20
def equal?(other)
  @title == other.title
end
inspect() click to toggle source

@private

# File lib/doing/section.rb, line 30
def inspect
  %(#<Doing::Section @title="#{@title}" @original="#{@original}">)
end
to_s() click to toggle source

Outputs section title

# File lib/doing/section.rb, line 25
def to_s
  @title
end