Module: Prawn::Configurable

Included in:
Document::Table
Defined in:
lib/prawn.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#configuration(*args) ⇒ Object Also known as: C



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/prawn.rb', line 39

def configuration(*args)
  @config ||= Marshal.load(Marshal.dump(default_configuration))
  if Hash === args[0]
    @config.update(args[0])
  elsif args.length > 1
    @config.values_at(*args)
  elsif args.length == 1
    @config[args[0]]
  else
    @config
  end
end