Method: Doing::Section#initialize
- Defined in:
- lib/doing/section.rb
#initialize(title, original: nil) ⇒ Section
Returns a new instance of Section.
8 9 10 11 12 13 14 15 16 17 18 |
# 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 |