Class: CM::Plugin::Function

Inherits:
Object
  • Object
show all
Defined in:
lib/core/plugin/function.rb

Instance Method Summary collapse

Instance Method Details

#execute(args) ⇒ Object


Operations



27
28
29
30
31
32
33
34
35
# File 'lib/core/plugin/function.rb', line 27

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

#initialized?(options = {}) ⇒ Boolean


Checks

Returns:

  • (Boolean)


17
18
19
# File 'lib/core/plugin/function.rb', line 17

def initialized?(options = {})
  true
end

#normalize(reload) ⇒ Object


Plugin interface



9
10
11
12
# File 'lib/core/plugin/function.rb', line 9

def normalize(reload)
  super
  yield if block_given?
end