Remove class Repubmark::Setup

This commit is contained in:
Alex Kotov 2024-02-24 07:44:34 +04:00
parent d66fc6eda1
commit c901f4070e
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
4 changed files with 0 additions and 32 deletions

View file

@ -8,7 +8,6 @@ require 'uri'
require_relative 'repubmark/config' require_relative 'repubmark/config'
require_relative 'repubmark/highlight' require_relative 'repubmark/highlight'
require_relative 'repubmark/setup'
require_relative 'repubmark/titled_ref' require_relative 'repubmark/titled_ref'
require_relative 'repubmark/elems/base' require_relative 'repubmark/elems/base'

View file

@ -23,7 +23,6 @@ module Repubmark
[ [
@annotation&.to_html, @annotation&.to_html,
@chapter&.to_html, @chapter&.to_html,
setup.epilogue,
].compact.join.freeze ].compact.join.freeze
end end
@ -31,18 +30,9 @@ module Repubmark
[ [
@annotation&.to_gemtext, @annotation&.to_gemtext,
@chapter&.to_gemtext, @chapter&.to_gemtext,
setup.epilogue,
].compact.join("\n\n\n").freeze ].compact.join("\n\n\n").freeze
end end
#################
# Setup methods #
#################
def setup(&)
@setup ||= Setup.new(&)
end
################### ###################
# Builder methods # # Builder methods #
################### ###################

View file

@ -29,8 +29,6 @@ module Repubmark
def config = parent.config def config = parent.config
def setup = parent.setup
class << self class << self
def parents(*args) def parents(*args)
if @parents if @parents

View file

@ -1,19 +0,0 @@
# frozen_string_literal: true
module Repubmark
class Setup
def initialize(**kwargs)
kwargs.each { |key, value| public_send :"#{key}=", value }
yield self if block_given?
freeze
end
attr_reader :epilogue
def epilogue=(epilogue)
epilogue = String(epilogue).strip.freeze
epilogue = nil if epilogue.empty?
@epilogue = epilogue
end
end
end