Class: PuppetStrings::Markdown::DataType

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

Overview

This class encapsualtes ruby data types and puppet type aliases

Defined Under Namespace

Classes: Function

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

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

Constructor Details

#initialize(registry) ⇒ DataType

Returns a new instance of DataType.



11
12
13
14
15
16
# File 'lib/puppet-strings/markdown/data_type.rb', line 11

def initialize(registry)
  @template = 'data_type.erb'
  super(registry, 'data type')
  @alias_of = registry[:alias_of] unless registry[:alias_of].nil?
  @functions = @registry[:functions].nil? ? nil : @registry[:functions].map { |func| DataType::Function.new(func) }
end

Instance Attribute Details

#alias_ofObject (readonly)

Returns the value of attribute alias_of.



8
9
10
# File 'lib/puppet-strings/markdown/data_type.rb', line 8

def alias_of
  @alias_of
end

#functionsObject (readonly)

Returns the value of attribute functions.



9
10
11
# File 'lib/puppet-strings/markdown/data_type.rb', line 9

def functions
  @functions
end

Instance Method Details

#renderObject



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

def render
  super(@template)
end