Class: PluginBuilder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ PluginBuilder



67
68
69
70
# File 'lib/zmb/plugin.rb', line 67

def initialize(&block)
  @plugin = Plugin.new
  @block = block
end

Instance Attribute Details

#pluginObject

Returns the value of attribute plugin



65
66
67
# File 'lib/zmb/plugin.rb', line 65

def plugin
  @plugin
end

Instance Method Details

#buildObject



72
73
74
# File 'lib/zmb/plugin.rb', line 72

def build
  instance_eval(&@block)
end

#description(value) ⇒ Object



80
81
82
# File 'lib/zmb/plugin.rb', line 80

def description(value)
  @plugin.description = value
end

#multi_instances(value) ⇒ Object



88
89
90
# File 'lib/zmb/plugin.rb', line 88

def multi_instances(value)
  @plugin.multi_instances = value
end

#name(value) ⇒ Object



76
77
78
# File 'lib/zmb/plugin.rb', line 76

def name(value)
  @plugin.name = value
end

#object(value) ⇒ Object



84
85
86
# File 'lib/zmb/plugin.rb', line 84

def object(value)
  @plugin.object = value
end