Class: PuppetStrings::Markdown::ResourceType

Inherits:
Base
  • Object
show all
Defined in:
lib/puppet-strings/markdown/resource_type.rb

Instance Method Summary collapse

Methods inherited from Base

#defaults, #examples, #link, #name, #options, #options_for_param, #params, #private?, #raises, #return_type, #see, #since, #text, #toc_info, #value_string

Constructor Details

#initialize(registry) ⇒ ResourceType

Returns a new instance of ResourceType.



5
6
7
8
# File 'lib/puppet-strings/markdown/resource_type.rb', line 5

def initialize(registry)
  @template = 'resource_type.erb'
  super(registry, 'type')
end

Instance Method Details

#parametersObject



18
19
20
# File 'lib/puppet-strings/markdown/resource_type.rb', line 18

def parameters
  @registry[:parameters]
end

#propertiesObject



14
15
16
# File 'lib/puppet-strings/markdown/resource_type.rb', line 14

def properties
  @registry[:properties]
end

#regex_in_data_type?(data_type) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
25
# File 'lib/puppet-strings/markdown/resource_type.rb', line 22

def regex_in_data_type?(data_type)
  m = data_type.match(/\w+\[\/.*\/\]/)
  m unless m.nil? || m.length.zero?
end

#renderObject



10
11
12
# File 'lib/puppet-strings/markdown/resource_type.rb', line 10

def render
  super(@template)
end