Method: Doing::Plugins.plugin_templates
- Defined in:
- lib/doing/plugin_manager.rb
.plugin_templates(type: :export) ⇒ Array<String>
Return array of available template names
195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/doing/plugin_manager.rb', line 195 def plugin_templates(type: :export) type = valid_type(type) templates = [] plugs = plugins[type].clone plugs.delete_if { |_t, o| o[:templates].nil? }.each do |_, | [:templates].each do |t| out = t[:name] out += " (#{t[:format]})" if t.key?(:format) templates << out end end templates.sort.uniq end |