Sha256: 37509a15a321a779e12ab4fdee5019ca568321769b7a5015850d612214b4bb80

Contents?: true

Size: 869 Bytes

Versions: 3

Compression:

Stored size: 869 Bytes

Contents

module CM
module Plugin
class Function < Nucleon.plugin_class(:nucleon, :base)

  #-----------------------------------------------------------------------------
  # Plugin interface

  def normalize(reload)
    super
    yield if block_given?
  end

  #-----------------------------------------------------------------------------
  # Checks

  def initialized?(options = {})
    true
  end

  #-----------------------------------------------------------------------------
  # Property accessors / modifiers

  #-----------------------------------------------------------------------------
  # Operations

  def execute(args)
    if initialized?
      output = ''
      output = yield if block_given?
    else
      output = ''
    end
    output.strip
  end

  #-----------------------------------------------------------------------------
  # Utilities

end
end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cm-0.1.8 lib/core/plugin/function.rb
cm-0.1.6 lib/core/plugin/function.rb
cm-0.1.4 lib/core/plugin/function.rb