Module: DocJuan

Defined in:
lib/doc_juan/token.rb,
lib/doc_juan/config.rb,
lib/doc_juan/version.rb,
lib/doc_juan/url_helper.rb,
lib/doc_juan/url_generator.rb

Defined Under Namespace

Classes: Configuration, NoHostGivenError, NoSecretGivenError, Token, UrlGenerator

Constant Summary collapse

VERSION =
"1.2.2"

Class Method Summary collapse

Class Method Details

.configObject



7
8
9
# File 'lib/doc_juan/config.rb', line 7

def self.config
  @config ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Yields:



3
4
5
# File 'lib/doc_juan/config.rb', line 3

def self.configure
  yield config
end

.url(url, filename, options = {}) ⇒ Object



4
5
6
# File 'lib/doc_juan/url_helper.rb', line 4

def self.url url, filename, options = {}
  UrlGenerator.new(url, filename, options.delete(:format) { 'pdf' }, options).generate
end