Class: Stove::Plugin::Base

Inherits:
Object
  • Object
show all
Extended by:
Mixin::Filterable, Mixin::Optionable, Mixin::Validatable
Includes:
Logify
Defined in:
lib/stove/plugins/base.rb

Direct Known Subclasses

Community, Git, GitHub, JIRA

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Mixin::Filterable

after, before

Methods included from Mixin::Optionable

extended, included

Methods included from Mixin::Validatable

validate

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, options = {})
  @cookbook, @options = cookbook, options
  instance_eval(&onload)
end

Instance Attribute Details

#cookbookObject (readonly)

Returns the value of attribute cookbook.



21
22
23
# File 'lib/stove/plugins/base.rb', line 21

def cookbook
  @cookbook
end

#optionsObject (readonly)

Returns the value of attribute options.



22
23
24
# File 'lib/stove/plugins/base.rb', line 22

def options
  @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