module Marta::ElementInformation

Marta is creating a hash of element data. For now it stores tag, text, and all the attributes.

Private Instance Methods

get_attributes(element, requestor = self) click to toggle source

We are getting three levels of attributes of element, parent and grandparent

# File lib/marta/element_information.rb, line 71
def get_attributes(element, requestor = self)
  result = Hash.new
  element_helper = ElementHelper.new requestor
  result['self'] = element_helper.get_element_info element
  result['pappy'] = element_helper.get_element_info element, 1
  result['granny'] = element_helper.get_element_info element, 2
  return result
end
method_structure(collection = false) click to toggle source

We can return the default structure of our special format

# File lib/marta/element_information.rb, line 81
def method_structure(collection = false)
  ElementHelper.method_structure collection
end