Module: Excursion::Builders

Defined in:
lib/excursion/builders.rb,
lib/excursion/builders/url_builder.rb,
lib/excursion/builders/application_builder.rb

Defined Under Namespace

Modules: ApplicationBuilder Classes: StaticBuilder, UrlBuilder

Class Method Summary collapse

Class Method Details

.builder(name) ⇒ Object



10
11
12
# File 'lib/excursion/builders.rb', line 10

def self.builder(name)
  builders[name]
end

.buildersObject



6
7
8
# File 'lib/excursion/builders.rb', line 6

def self.builders
  @builders ||= {}
end

.register_builder(h) ⇒ Object

Builders register themselves here when they’re created so they can be shared between different instances (like the StaticBuilder below and ActionController)



16
17
18
19
20
# File 'lib/excursion/builders.rb', line 16

def self.register_builder(h)
  @builders ||= {}
  @builders[h.application.name] = h
  h
end