class PuppetStrings::Yard::CodeObjects::DataTypeAlias
Implements the Puppet
DataTypeAlias
code object.
Attributes
Public Class Methods
Source
# File lib/puppet-strings/yard/code_objects/data_type_alias.rb, line 30 def initialize(statement) @statement = statement @alias_of = statement.alias_of super(PuppetStrings::Yard::CodeObjects::DataTypeAliases.instance, statement.name) end
Initializes a Puppet
data type alias code object. @param [PuppetStrings::Parsers::DataTypeAliasStatement] statement The data type alias statement that was parsed. @return [void]
Calls superclass method
PuppetStrings::Yard::CodeObjects::Base::new
Public Instance Methods
Source
# File lib/puppet-strings/yard/code_objects/data_type_alias.rb, line 44 def source # Not implemented, but would be nice! nil end
Gets the source of the code object. @return Returns the source of the code object.
Source
# File lib/puppet-strings/yard/code_objects/data_type_alias.rb, line 51 def to_hash hash = {} hash[:name] = name hash[:file] = file hash[:line] = line hash[:docstring] = PuppetStrings::Yard::Util.docstring_to_hash(docstring) hash[:alias_of] = alias_of hash end
Converts the code object to a hash representation. @return [Hash] Returns a hash representation of the code object.
Source
# File lib/puppet-strings/yard/code_objects/data_type_alias.rb, line 38 def type :puppet_data_type_alias end
Gets the type of the code object. @return Returns the type of the code object.