class Greeve::Namespace

Contains a group of attributes.

Attributes

name[R]

@return [Symbol] name of the namespace

Public Class Methods

new(name, xml_element, &block) click to toggle source

@param name [Symbol] name of the namespace @param xml_element [Ox::Element] the xml namespace element for this item @yield a block containing the attribute definitions

# File lib/greeve/namespace.rb, line 18
def initialize(name, xml_element, &block)
  @name = name
  @xml_element = xml_element
  @attributes = {}

  # Load the attribute configuration in the rowset block.
  instance_eval(&block)

  # Disable the DSL methods since the attributes have been configured.
  define_singleton_method(:attribute) { raise NoMethodError, "private method" }
  define_singleton_method(:namespace) { raise NoMethodError, "private method" }
end