Class: PuppetStrings::Markdown::DataType
- 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
-
#alias_of ⇒ Object
readonly
Returns the value of attribute alias_of.
-
#functions ⇒ Object
readonly
Returns the value of attribute functions.
Instance Method Summary collapse
-
#initialize(registry) ⇒ DataType
constructor
A new instance of DataType.
- #render ⇒ Object
Methods inherited from Base
#defaults, #enums, #enums_for_param, #examples, group_name, items, #link, #name, #options, #options_for_param, #params, #private?, #raises, #return_type, #see, #since, #text, #toc_info, #word_wrap, yard_types
Methods included from Helpers
Constructor Details
#initialize(registry) ⇒ DataType
Returns a new instance of DataType.
13 14 15 16 17 18 |
# File 'lib/puppet-strings/markdown/data_type.rb', line 13 def initialize(registry) @template = 'data_type.erb' super(registry, 'data type') @alias_of = registry[:alias_of] unless registry[:alias_of].nil? @functions = @registry[:functions]&.map { |func| DataType::Function.new(func) } end |
Instance Attribute Details
#alias_of ⇒ Object (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 |
#functions ⇒ Object (readonly)
Returns the value of attribute functions.
8 9 10 |
# File 'lib/puppet-strings/markdown/data_type.rb', line 8 def functions @functions end |
Instance Method Details
#render ⇒ Object
20 21 22 |
# File 'lib/puppet-strings/markdown/data_type.rb', line 20 def render super(@template) end |