<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -108,7 +108,16 @@ module Elementor
     
     def content
       return unless doc_ready?
-      @content ||= context.send(opts[:from] || :body)
+      @content ||= content_from
+    end
+
+    def content_from
+      from = opts[:from] || :body
+      if from.is_a?(Proc)
+        from.call
+      else
+        context.send(from)
+      end
     end
   end
 end</diff>
      <filename>lib/elementor/result.rb</filename>
    </modified>
    <modified>
      <diff>@@ -193,6 +193,19 @@ describe Elementor do
             result.should have(2).headers
             result.should have(4).tags
           end
+
+          it &quot;calls the proc to get the markup&quot; do
+            meta_eval { alias_method :other_body, :body }
+            
+            @result = elements(:from =&gt; proc { other_body }) do |tag|
+              tag.headers &quot;h1&quot;
+              tag.tags &quot;.tag-cloud a&quot;
+              tag.user_links &quot;#user-links&quot;
+            end
+            
+            result.should have(2).headers
+            result.should have(4).tags
+          end
           
           it &quot;works when the HTML isn't present until after the #elements call&quot; do
             mock(self).deferred_source.once.returns(HTML_DOCUMENT.dup)</diff>
      <filename>spec/elementor_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2e55b7fc1bfe6c5f8dd8fbc2c9b717afc7e17505</id>
    </parent>
  </parents>
  <author>
    <name>Les Hill</name>
    <email>leshill@gmail.com</email>
  </author>
  <url>http://github.com/nakajima/elementor/commit/9d4e4577d958de6da265ffd8e037f98d87321fa1</url>
  <id>9d4e4577d958de6da265ffd8e037f98d87321fa1</id>
  <committed-date>2009-03-14T07:48:42-07:00</committed-date>
  <authored-date>2009-03-14T07:48:42-07:00</authored-date>
  <message>Allow proc with :from option</message>
  <tree>e907b5caf122568b267e874a9ad7b88716caf335</tree>
  <committer>
    <name>Les Hill</name>
    <email>leshill@gmail.com</email>
  </committer>
</commit>
