class PuppetStrings::Markdown::ResourceType
Public Class Methods
Source
# File lib/puppet-strings/markdown/resource_type.rb, line 11 def initialize(registry) @template = 'resource_type.erb' super(registry, 'type') end
Calls superclass method
PuppetStrings::Markdown::Base::new
Public Instance Methods
Source
# File lib/puppet-strings/markdown/resource_type.rb, line 26 def checks return nil unless @registry[:checks] @registry[:checks].sort_by { |p| p[:name] } end
Source
# File lib/puppet-strings/markdown/resource_type.rb, line 42 def parameters return nil unless @registry[:parameters] @registry[:parameters].sort_by { |p| p[:name] }.map do |param| param[:link] = clean_link("$#{name}::#{param[:name]}") param end end
Source
# File lib/puppet-strings/markdown/resource_type.rb, line 20 def properties return nil unless @registry[:properties] @registry[:properties].sort_by { |p| p[:name] } end
Source
# File lib/puppet-strings/markdown/resource_type.rb, line 33 def properties_and_checks return nil if properties.nil? && checks.nil? ((properties || []) + (checks || [])).sort_by { |p| p[:name] }.map do |prop| prop[:link] = clean_link("$#{name}::#{prop[:name]}") prop end end
“checks” (such as “onlyif” or “creates”) are another type of property
Source
# File lib/puppet-strings/markdown/resource_type.rb, line 51 def regex_in_data_type?(data_type) m = data_type.match(%r{\w+\[/.*/\]}) m unless m.nil? || m.to_a.empty? end
Source
# File lib/puppet-strings/markdown/resource_type.rb, line 16 def render super(@template) end
Calls superclass method
PuppetStrings::Markdown::Base#render