diff --git a/lib/roar/representer/feature/hypermedia.rb b/lib/roar/representer/feature/hypermedia.rb
index <HASH>..<HASH> 100644
--- a/lib/roar/representer/feature/hypermedia.rb
+++ b/lib/roar/representer/feature/hypermedia.rb
@@ -6,6 +6,8 @@ module Roar
       # Adds links methods to the model which can then be used for hypermedia links when
       # representing the model.
       module Hypermedia # TODO: test me.
+        extend ActiveSupport::Concern
+        
         def links=(links)
           @links = links.collect do |link|
             Roar::Representer::XML::Hyperlink.from_attributes(link)
@@ -21,6 +23,22 @@ module Roar
             link = find { |l| l.rel.to_s == rel.to_s } and return link.href
           end
         end
+        
+        
+        module ClassMethods
+          # Defines an embedded hypermedia link.
+          def link(rel, &block)
+            unless links = representable_attrs.find { |d| d.is_a?(LinksDefinition)}
+              links = LinksDefinition.new(:links, links_definition_options)
+              representable_attrs << links
+              add_reader(links) # TODO: refactor in Roxml.
+              attr_writer(links.accessor)
+            end
+            
+            links.rel2block << {:rel => rel, :block => block}
+          end
+        end
+        
       end
     end
   end
moving hypermedia code to Hypermedia.