Module: Podium

Defined in:
lib/podium.rb,
lib/podium/client.rb,
lib/podium/engine.rb,
lib/podium/version.rb,
lib/podium/manifest.rb,
lib/podium/resource.rb,
lib/podium/configuration.rb,
lib/podium/podlet_helpers.rb,
lib/podium/podlet_preview.rb,
lib/podium/controller_helpers.rb,
app/helpers/podium/layout_helper.rb,
lib/generators/podium/podlet_generator.rb,
lib/generators/podium/install_generator.rb,
app/controllers/podium/podlet_preview_controller.rb

Defined Under Namespace

Modules: ControllerHelpers, LayoutHelper, PodletHelpers, PodletPreview Classes: Client, Configuration, Engine, InstallGenerator, Manifest, NotConfiguredError, PodletGenerator, PodletPreviewController, Resource

Constant Summary collapse

VERSION =
"0.8.0"

Class Method Summary collapse

Class Method Details

.build_instanceObject



30
31
32
33
34
35
36
# File 'lib/podium.rb', line 30

def self.build_instance
  client = Podium::Client.new(name_to_url: configuration.name_to_url)
  configuration.podlets.each do |key, url|
    client.register(key, url)
  end
  client
end

.configurationObject



17
18
19
# File 'lib/podium.rb', line 17

def self.configuration
  @configuration || (raise NotConfiguredError, "Did you forget to run Podium.configure ?")
end

.configure {|configuration| ... } ⇒ Object

Yields:



21
22
23
24
# File 'lib/podium.rb', line 21

def self.configure
  @configuration ||= Configuration.new
  yield(configuration)
end

.instanceObject



26
27
28
# File 'lib/podium.rb', line 26

def self.instance
  @instance ||= build_instance
end