Class: Plugin
- Inherits:
-
Object
- Object
- Plugin
- Defined in:
- lib/common/plugins/plugin.rb
Direct Known Subclasses
Instance Attribute Summary (collapse)
-
- (Object) author
readonly
Returns the value of attribute author.
-
- (Object) registered_options
readonly
Returns the value of attribute registered_options.
Instance Method Summary (collapse)
-
- (Plugin) initialize(infos = {})
constructor
A new instance of Plugin.
-
- (Object) register_options(*options)
param Array options.
- - (Object) run(options = {})
Constructor Details
- (Plugin) initialize(infos = {})
A new instance of Plugin
7 8 9 |
# File 'lib/common/plugins/plugin.rb', line 7 def initialize(infos = {}) @author = infos[:author] end |
Instance Attribute Details
- (Object) author (readonly)
Returns the value of attribute author
5 6 7 |
# File 'lib/common/plugins/plugin.rb', line 5 def @author end |
- (Object) registered_options (readonly)
Returns the value of attribute registered_options
5 6 7 |
# File 'lib/common/plugins/plugin.rb', line 5 def @registered_options end |
Instance Method Details
- (Object) register_options(*options)
param Array options
16 17 18 19 20 21 22 23 |
# File 'lib/common/plugins/plugin.rb', line 16 def (*) .each do |option| unless option.is_a?(Array) raise "Each option must be an array, #{option.class} supplied" end end @registered_options = end |
- (Object) run(options = {})
11 12 13 |
# File 'lib/common/plugins/plugin.rb', line 11 def run( = {}) raise NotImplementedError end |