def elements(name, tag=:element, identifier={:index => 0}, &block)
      #
      # sets tag as element if not defined
      #
      if tag.is_a?(Hash)
        identifier = tag
        tag        = :element
      end

      define_method("#{name}_elements") do
        return call_block(&block) if block_given?
        platform.elements_for(tag, identifier.clone)
      end
    end
def elements(name, tag=:element, identifier={:index => 0}, &block)
      #
      # sets tag as element if not defined
      #
      if tag.is_a?(Hash)
        identifier = tag
        tag        = :element
      end

      define_method("#{name}_elements") do
        return call_block(&block) if block_given?
        platform.elements_for(tag, identifier.clone)
      end
    end
adds a method to return a collection of generic Element objects
 for a specific tag.

 @example
   elements(:title, :header, :id => 'title')
   # will generate ''title_elements'

 @param [Symbol] the name used for the generated methods
 @param [Symbol] the name of the tag for the element
 @param [Hash] identifier how we find an element.
 @param optional block to be invoked when element method is called