class PuppetStrings::Yard::CodeObjects::Type::Feature
Represents a resource type feature.
Attributes
Public Class Methods
Source
# File lib/puppet-strings/yard/code_objects/type.rb, line 88 def initialize(name, docstring) @name = name @docstring = PuppetStrings::Yard::Util.scrub_string(docstring).tr("\n", ' ') end
Initializes a new feature. @param [String] name The name of the feature. @param [String] docstring The docstring of the feature.
Public Instance Methods
Source
# File lib/puppet-strings/yard/code_objects/type.rb, line 95 def to_hash hash = {} hash[:name] = name hash[:description] = docstring unless docstring.empty? hash end
Converts the feature to a hash representation. @return [Hash] Returns a hash representation of the feature.