module Elegant::Config
Provides methods to read and write global configuration settings.
@example Set the author of PDF files to 'John Doe':
Elegant.configure do |config| config.author = 'John Doe' end
Public Instance Methods
configuration()
click to toggle source
Returns the global {Elegant::Models::Configuration} object.
While this method can be used to read and write configuration settings, it is easier to use {Elegant::Config#configure} Elegant.configure}.
@example
Elegant.configuration.author = 'John Doe'
@return [Elegant::Configuration] The global configuration.
# File lib/elegant/config.rb, line 33 def configuration @configuration ||= Elegant::Configuration.new end
configure() { |configuration| ... }
click to toggle source
Yields the global configuration to the given block.
@example
Elegant.configure do |config| config.author = 'John Doe' end
@yield [Elegant::Configuration] The global configuration.
# File lib/elegant/config.rb, line 20 def configure yield configuration if block_given? end