class Gammo::Attribute

Class for representing an attribute.

Attributes

key[RW]
namespace[RW]
owner_element[RW]

@!visibility private

value[RW]

Public Class Methods

new(key:, value:, namespace: nil, owner_element: nil) click to toggle source

Constructs an attribute with the key-value pair. @param [String] key @param [String] value @param [String] namespace @param [Gammo::Element] owner_element @return [Attribute]

# File lib/gammo/attribute.rb, line 15
def initialize(key:, value:, namespace: nil, owner_element: nil)
  @key           = key
  @value         = value
  @namespace     = namespace
  @owner_element = owner_element
end

Public Instance Methods

to_s() click to toggle source
# File lib/gammo/attribute.rb, line 22
def to_s
  "<Gammo::Attribute #{key}='#{value}'>"
end