Class: RuGUI::Plugin::Loader
Instance Attribute Summary collapse
-
#configurations ⇒ Object
Returns the value of attribute configurations.
-
#initializer ⇒ Object
Returns the value of attribute initializer.
Instance Method Summary collapse
-
#initialize(initializer, configurations) ⇒ Loader
constructor
A new instance of Loader.
- #load_plugins ⇒ Object
- #plugins ⇒ Object
Constructor Details
#initialize(initializer, configurations) ⇒ Loader
Returns a new instance of Loader.
8 9 10 11 12 |
# File 'lib/rugui/plugin/loader.rb', line 8 def initialize(initializer, configurations) self.initializer = initializer self.configurations = configurations @@located_plugins ||= [] end |
Instance Attribute Details
#configurations ⇒ Object
Returns the value of attribute configurations.
5 6 7 |
# File 'lib/rugui/plugin/loader.rb', line 5 def configurations @configurations end |
#initializer ⇒ Object
Returns the value of attribute initializer.
4 5 6 |
# File 'lib/rugui/plugin/loader.rb', line 4 def initializer @initializer end |
Instance Method Details
#load_plugins ⇒ Object
14 15 16 17 18 19 |
# File 'lib/rugui/plugin/loader.rb', line 14 def load_plugins plugins.each do |plugin| plugin.load unless plugin.loaded? register_as_loaded(plugin) end end |
#plugins ⇒ Object
21 22 23 |
# File 'lib/rugui/plugin/loader.rb', line 21 def plugins @plugins ||= locate_plugins end |