<commit_before>require 'spec_helper'

module Deterministic
  module Procify
    def py(m, *args)
      args.count > 0 ? method(m).to_proc.curry[*args] : method(m)
    end
  end
end

class BookingController
  include Deterministic
  include Deterministic::Procify

  Context = Struct.new(:booking, :ability, :format)

  def index(id, format=:html)
    get_booking(id)           << log(:booking) >>
    py(:ability)              << log(:ability) >>
    py(:present, format)      << log(:presenter) >>
    py(:render)               << log(:render)
  end

  def log(step)<commit_msg>Add controller example<commit_after>require 'spec_helper'

module Deterministic
  module Procify
    def py(m, *args)
      args.count > 0 ? method(m).to_proc.curry[*args] : method(m)
    end
  end
end

class BookingController
  include Deterministic
  include Deterministic::Procify

  Context = Struct.new(:booking, :ability, :format)

  def index(id, format=:html)
<<<<<<< HEAD
    get_booking(id)           << log(:booking) >>
=======
    p get_booking(id)         << log(:booking) >>
>>>>>>> Add controller example
    py(:ability)              << log(:ability) >>
    py(:present, format)      << log(:presenter) >>
    py(:render)               << log(:render)
  end

  def log(step)
{'fraction_non_alphanumeric': 0.14657210401891252, 'fraction_numerical': 0.0015760441292356187, 'mean_word_length': 2.931888544891641, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 26, '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': '2865117', 'n_tokens_mistral': 429, 'n_tokens_neox': 407, 'n_words': 90}