<commit_before>require 'logan/HashConstructed'
require 'logan/comment'
require 'logan/person'

module Logan
  class Todo
    include HashConstructed

    attr_accessor :id
    attr_accessor :project_id
    attr_accessor :content
    attr_accessor :completed
    attr_accessor :comments_count
    attr_reader :assignee
    attr_accessor :due_at
    attr_accessor :position

    def post_json
      {
        :content => @content,
        :due_at => @due_at,
        :assignee => @assignee.blank? ? nil : @assignee.to_hash
      }.to_json
    end

    def put_json
      {
        :content => @content,
        :due_at => @due_at,
        :assignee => @assignee.blank? ? nil : @assignee.to_hash,
        :position => @position.blank? ? 99  : @position,
        :completed => @completed<commit_msg>remove calls to blank so rails is not a requirement<commit_after>require 'logan/HashConstructed'
require 'logan/comment'
require 'logan/person'

module Logan
  class Todo
    include HashConstructed

    attr_accessor :id
    attr_accessor :project_id
    attr_accessor :content
    attr_accessor :completed
    attr_accessor :comments_count
    attr_reader :assignee
    attr_accessor :due_at
    attr_accessor :position

    def post_json
      {
        :content => @content,
        :due_at => @due_at,
        :assignee => (@assignee.nil? || @assignee.empty?) ? nil : @assignee.to_hash
      }.to_json
    end

    def put_json
      {
        :content => @content,
        :due_at => @due_at,
        :assignee => (@assignee.nil? || @assignee.empty?) ? nil : @assignee.to_hash,
        :position => (@position.nil? || @position.empty?) ? 99  : @position,
        :completed => @completed
{'fraction_non_alphanumeric': 0.10604265402843602, 'fraction_numerical': 0.002369668246445498, 'mean_word_length': 2.728476821192053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '3577253', 'n_tokens_mistral': 573, 'n_tokens_neox': 537, 'n_words': 123}