Class: Webgen::BundleLoader::BundleInformation
- Inherits:
-
Object
- Object
- Webgen::BundleLoader::BundleInformation
- Defined in:
- lib/webgen/bundle_loader.rb
Overview
Exposes information about bundles like author, license, bundle homepage as well as extension and configuration option documentation.
Instance Method Summary collapse
-
#add_bundle(name, info_file) ⇒ Object
Add the bundle
name
with the given information file to the list of available bundles. -
#bundles ⇒ Object
Return a hash with information about bundles.
-
#extensions ⇒ Object
Return a hash with information about extensions.
-
#initialize ⇒ BundleInformation
constructor
:nodoc:.
-
#options ⇒ Object
Return a hash with information about options.
Constructor Details
#initialize ⇒ BundleInformation
:nodoc:
22 23 24 25 |
# File 'lib/webgen/bundle_loader.rb', line 22 def initialize #:nodoc: @bundles = {} @infos = nil end |
Instance Method Details
#add_bundle(name, info_file) ⇒ Object
Add the bundle name
with the given information file to the list of available bundles.
28 29 30 31 32 |
# File 'lib/webgen/bundle_loader.rb', line 28 def add_bundle(name, info_file) raise "Bundle information already registered for #{name}" if @bundles.has_key?(name) @bundles[name] = info_file load_bundle_information unless @infos.nil? end |
#bundles ⇒ Object
Return a hash with information about bundles.
35 36 37 |
# File 'lib/webgen/bundle_loader.rb', line 35 def bundles infos[:bundles] end |
#extensions ⇒ Object
Return a hash with information about extensions.
40 41 42 |
# File 'lib/webgen/bundle_loader.rb', line 40 def extensions infos[:extensions] end |
#options ⇒ Object
Return a hash with information about options.
45 46 47 |
# File 'lib/webgen/bundle_loader.rb', line 45 def infos[:options] end |