Class: Stove::Plugin::Base
- Inherits:
-
Object
- Object
- Stove::Plugin::Base
- Extended by:
- Mixin::Filterable, Mixin::Optionable, Mixin::Validatable
- Includes:
- Logify
- Defined in:
- lib/stove/plugins/base.rb
Instance Attribute Summary collapse
-
#cookbook ⇒ Object
readonly
Returns the value of attribute cookbook.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cookbook, options = {}) ⇒ Base
constructor
A new instance of Base.
Methods included from Mixin::Filterable
Methods included from Mixin::Optionable
Methods included from Mixin::Validatable
Constructor Details
#initialize(cookbook, options = {}) ⇒ Base
Returns a new instance of Base.
24 25 26 27 |
# File 'lib/stove/plugins/base.rb', line 24 def initialize(cookbook, = {}) @cookbook, @options = cookbook, instance_eval(&onload) end |
Instance Attribute Details
#cookbook ⇒ Object (readonly)
Returns the value of attribute cookbook.
21 22 23 |
# File 'lib/stove/plugins/base.rb', line 21 def cookbook @cookbook end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
22 23 24 |
# File 'lib/stove/plugins/base.rb', line 22 def @options end |
Class Method Details
.onload(&block) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/stove/plugins/base.rb', line 12 def onload(&block) if block @onload = block else @onload end end |