Sha256: a36410cdb8ac3071c3cabab28fd32b018feb15972ad6fceafd4dadbed88bbd12
Contents?: true
Size: 973 Bytes
Versions: 5
Compression:
Stored size: 973 Bytes
Contents
require 'puppet-strings/markdown/base' module PuppetStrings::Markdown class Function < Base attr_reader :signatures def initialize(registry) @template = 'function.erb' super(registry, 'function') @signatures = [] registry[:signatures].each do |sig| @signatures.push(Signature.new(sig)) end end def render super(@template) end def type t = @registry[:type] if t =~ /ruby4x/ "Ruby 4.x API" elsif t =~ /ruby3/ "Ruby 3.x API" elsif t =~ /ruby/ "Ruby" else "Puppet Language" end end def error_type(r) "`#{r.split(' ')[0]}`" end def error_text(r) "#{r.split(' ').drop(1).join(' ')}" end end class Function::Signature < Base def initialize(registry) @registry = registry super(@registry, 'function signature') end def signature @registry[:signature] end end end
Version data entries
5 entries across 5 versions & 1 rubygems