Class: Webgen::BundleLoader::BundleInformation

Inherits:
Object
  • Object
show all
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

Constructor Details

#initializeBundleInformation

: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

#bundlesObject

Return a hash with information about bundles.



35
36
37
# File 'lib/webgen/bundle_loader.rb', line 35

def bundles
  infos[:bundles]
end

#extensionsObject

Return a hash with information about extensions.



40
41
42
# File 'lib/webgen/bundle_loader.rb', line 40

def extensions
  infos[:extensions]
end

#optionsObject

Return a hash with information about options.



45
46
47
# File 'lib/webgen/bundle_loader.rb', line 45

def options
  infos[:options]
end