def semantic_attributes_for(record, options = {}, &block)
      options[:html] ||= {}

      html_class = [ "attrtastic", record.class.to_s.underscore, options[:html][:class] ].compact.join(" ")

      output = tag(:div, { :class => html_class}, true)
      if block_given?
        output << capture(SemanticAttributesBuilder.new(record, self), &block)
      else
        output << capture(SemanticAttributesBuilder.new(record, self)) do |attr|
          attr.attributes
        end
      end
      output.safe_concat("</div>")
    end
def semantic_attributes_for(record, options = {}, &block)
      options[:html] ||= {}

      html_class = [ "attrtastic", record.class.to_s.underscore, options[:html][:class] ].compact.join(" ")

      output = tag(:div, { :class => html_class}, true)
      if block_given?
        output << capture(SemanticAttributesBuilder.new(record, self), &block)
      else
        output << capture(SemanticAttributesBuilder.new(record, self)) do |attr|
          attr.attributes
        end
      end
      output.safe_concat("</div>")
    end
Creates attributes for given object

 @param[ActiveRecord] record AR instance record for which to display attributes
 @param[Hash] options Opions
 @option options [Hash] :html ({}) Hash with optional :class html class name for html block
 @yield [attr] Block which is yield inside of markup
 @yieldparam [SemanticAttributesBuilder] builder Builder for attributes for given AR record

 @example
   <%= semantic_attributes_for @user do |attr| %>
     <%= attr.attributes do %>
       <%= attr.attribute :name %>
       <%= attr.attribute :email %>
     <% end %>
   <% end %>

 @example
   <%= semantic_attributes_for @user %>