Attribute
public final class Attribute
This class is responsible for managing attributes of HTML elements
-
Contains a array of AttributeType. Default is
[]
Declaration
Swift
private var attributes: [AttributeType]
-
Init with array of AttributeType
Declaration
Swift
public init(_ attributes: [AttributeType])
Parameters
attributes
[AttributeType]
-
This method add a new single attribute
Declaration
Swift
public func add(_ attr: AttributeType)
Parameters
attr
-
This function return all attribures
Declaration
Swift
public func getAll() -> [AttributeType]
Return Value
[AttributeType]
-
This method return a
String
with all attributesDeclaration
Swift
public func getString() -> String
Return Value
String
all attributes -
This method print all attributes
Declaration
Swift
public func generate()