<commit_before>module PivotalTracker
  class Iteration
    include HappyMapper

    class << self
      def all(project, options={})
        params = PivotalTracker.encode_options(options)
        parse(Client.connection["/projects/#{project.id}/iterations#{params}"].get)
      end
    end

    element :id, Integer
    element :number, Integer
    element :start, DateTime
    element :finish, DateTime

    has_many :stories, Story

  end
end<commit_msg>Add Iteration.current method, since I can't find a way to get the current iteration by passing params into the existing #all method and there are no docs...<commit_after>module PivotalTracker
  class Iteration
    include HappyMapper

    class << self
      def all(project, options={})
        params = PivotalTracker.encode_options(options)
        parse(Client.connection["/projects/#{project.id}/iterations#{params}"].get)
      end
      
      def current(project)
        parse(Client.connection["projects/#{project.id}/iterations/current"].get)
      end
    end

    element :id, Integer
    element :number, Integer
    element :start, DateTime
    element :finish, DateTime

    has_many :stories, Story

  end
end
{'fraction_non_alphanumeric': 0.09298393913778528, 'fraction_numerical': 0.0, 'mean_word_length': 3.13986013986014, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5694564', 'n_tokens_mistral': 330, 'n_tokens_neox': 321, 'n_words': 95}