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)
- RegistryTimeout =
Internal: Custom exception class to raise for response timeouts.
Class.new(RestClient::RequestTimeout)
- VERSION =
:nodoc:
'0.3.0'
Class Method Summary collapse
-
.config ⇒ Object
Public: Getter for OC Configuration.
-
.configure {|self.config| ... } ⇒ Object
Public: Setter for Configuration.
Class Method Details
.config ⇒ Object
Public: Getter for OC Configuration.
Returns the Configuration if set, a default Configuration if not set.
35 36 37 |
# File 'lib/opencomponents.rb', line 35 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.
48 49 50 |
# File 'lib/opencomponents.rb', line 48 def self.configure yield self.config end |