Sha256: f34d27f3284c1d657cefef23e15d3afd20103f7297544b9e29eea7517d47686a
Contents?: true
Size: 766 Bytes
Versions: 15
Compression:
Stored size: 766 Bytes
Contents
module Doc class RootConfig < ConfigObject attr_reader :documentor def initialize(documentor, *arguments, &block) @documentor = documentor super :title, *arguments, &block if clean_after if !clean_after.is_a?(Numeric) raise "clean_after must be a number, got #{clean_after.inspect}" elsif clean_after < 0 raise "clean_after must zero or greater, got #{clean_after.inspect}" end end end def configurators @configurators ||= [] end def self.configurator(name, klass) class_eval <<-RUBY, __FILE__, __LINE__ def #{name}(*arguments, &block) configurators << #{klass}.new(documentor, *arguments, &block) end RUBY end end end
Version data entries
15 entries across 15 versions & 1 rubygems