def add_classes(relations)
      relations.each do |cls|
        extract(cls[:doc]).each_with_index do |ex, i|
          @examples << {
            :id => cls[:name] + "-" + i.to_s,
            :name => cls[:name] + " example #" + (i+1).to_s,
            :href => '#!/api/' + cls[:name],
            :code => ex[:code],
            :options => ex[:options],
          }
        end
      end

      self
    end
def add_classes(relations)
      relations.each do |cls|
        extract(cls[:doc]).each_with_index do |ex, i|
          @examples << {
            :id => cls[:name] + "-" + i.to_s,
            :name => cls[:name] + " example #" + (i+1).to_s,
            :href => '#!/api/' + cls[:name],
            :code => ex[:code],
            :options => ex[:options],
          }
        end
      end

      self
    end
Extracts inline examples from classes