<commit_before>TestObject = Struct.new(:title)

class Api::TestObjectRepresenter < Roar::Decorator
  include Roar::Representer::JSON::HAL

  property :title

  def api_tests_path(represented)
    "/api/tests/#{represented.title}"
  end

  link :self do
    api_tests_path(represented)
  end
end

test_routes = Proc.new do
  namespace :api do
    resources :test_objects
  end
end
Rails.application.routes.eval_block(test_routes)



# class Api::TestsRepresenter < Roar::Decorator
#   include Api::PagedCollectionRepresenter

#   def api_tests_path(represented)
#     "/api/tests?page=#{represented[:page] || 1}"
#   end

#   collection :items, as: :tests, embedded: true, class: TestObject, decorator: Api::TestRepresenter
# end
<commit_msg>remove unused test representer<commit_after>TestObject = Struct.new(:title)

class Api::TestObjectRepresenter < Roar::Decorator
  include Roar::Representer::JSON::HAL

  property :title

  def api_tests_path(represented)
    "/api/tests/#{represented.title}"
  end

  link :self do
    api_tests_path(represented)
  end
end

test_routes = Proc.new do
  namespace :api do
    resources :test_objects
  end
end
Rails.application.routes.eval_block(test_routes)
{'fraction_non_alphanumeric': 0.10684474123539232, 'fraction_numerical': 0.0008347245409015025, 'mean_word_length': 4.935643564356436, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2599546', 'n_tokens_mistral': 417, 'n_tokens_neox': 393, 'n_words': 84}