class PuppetStrings::Yard::CodeObjects::DataTypeAlias
Implements the Puppet
DataTypeAlias
code object.
Attributes
alias_of[RW]
statement[R]
Public Class Methods
new(statement)
click to toggle source
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
# 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
Public Instance Methods
source()
click to toggle source
Gets the source of the code object. @return Returns the source of the code object.
# File lib/puppet-strings/yard/code_objects/data_type_alias.rb, line 44 def source # Not implemented, but would be nice! nil end
to_hash()
click to toggle source
Converts the code object to a hash representation. @return [Hash] Returns a hash representation of the code object.
# 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
type()
click to toggle source
Gets the type of the code object. @return Returns the type of the code object.
# File lib/puppet-strings/yard/code_objects/data_type_alias.rb, line 38 def type :puppet_data_type_alias end