Module: OpenComponents

Defined in:
lib/opencomponents.rb,
lib/opencomponents/version.rb,
lib/opencomponents/renderer.rb,
lib/opencomponents/component.rb,
lib/opencomponents/rendered_component.rb,
lib/opencomponents/prerendered_component.rb

Defined Under Namespace

Modules: Renderer Classes: Component, Configuration, PrerenderedComponent, RenderedComponent, Template

Constant Summary collapse

DEFAULT_REGISTRY =

Public: Default OC registry URL (localhost:3030).

'http://localhost:3030'
ComponentNotFound =

Internal: Custom exception class to raise in the event a component cannot be

found in the registry.
Class.new(RuntimeError)
VERSION =

:nodoc:

'0.2.0'

Class Method Summary collapse

Class Method Details

.configObject

Public: Getter for OC Configuration.

Returns the Configuration if set, a default Configuration if not set.



30
31
32
# File 'lib/opencomponents.rb', line 30

def self.config
  @@_config ||= Configuration.new(DEFAULT_REGISTRY)
end

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

Public: Setter for Configuration.

Examples

OpenComponents.configure do |oc|
  oc.registry = 'http://my-awesome-oc-registry.com'
end

Returns the Configuration.

Yields:



43
44
45
# File 'lib/opencomponents.rb', line 43

def self.configure
  yield self.config
end