class PuppetStrings::Markdown::Function
Attributes
Public Class Methods
Source
# File lib/puppet-strings/markdown/function.rb, line 13 def initialize(registry) @template = 'function.erb' super(registry, 'function') @signatures = [] registry[:signatures].each do |sig| @signatures.push(Signature.new(sig)) end end
Calls superclass method
PuppetStrings::Markdown::Base::new
Public Instance Methods
Source
# File lib/puppet-strings/markdown/function.rb, line 43 def error_text(text) text.split.drop(1).join(' ').to_s end
Source
# File lib/puppet-strings/markdown/function.rb, line 39 def error_type(type) "`#{type.split[0]}`" end
Source
# File lib/puppet-strings/markdown/function.rb, line 22 def render super(@template) end
Calls superclass method
PuppetStrings::Markdown::Base#render
Source
# File lib/puppet-strings/markdown/function.rb, line 26 def type t = @registry[:type] if t.include?('ruby4x') 'Ruby 4.x API' elsif t.include?('ruby3') 'Ruby 3.x API' elsif t.include?('ruby') 'Ruby' else 'Puppet Language' end end