class YARD::CodeObjects::Chef::AttributeObject
Attributes
attributes[RW]
Public Class Methods
new(namespace, name)
click to toggle source
Creates a new instance of the AttributeObject
which represents a file in the attributes directory.
@param namespace [NamespaceObject] namespace to which the attribute belongs @param name [String] name of the attribute file
@return [AttributeObject] the newly created AttribteObject
Calls superclass method
# File lib/yard-chefdoc/code_objects/attribute.rb, line 17 def initialize(namespace, name) super(namespace, name) @attributes = [] end
Public Instance Methods
add(h)
click to toggle source
Add a single attribute as an Attribute
object (see below)
@param h [Hash] The attribute hash to add
# File lib/yard-chefdoc/code_objects/attribute.rb, line 26 def add(h) @attributes.push(Attribute.new(h)) end