<commit_before>require 'one_click_orgs/model_wrapper'

# Represents a ShareTransaction that transfers shares from
# the organisation's account to the user's account.
class ShareApplication < OneClickOrgs::ModelWrapper
  attr_accessor :share_transaction
  attr_reader :member

  delegate :amount, :amount=, :to => :share_transaction

  def initialize(new_attributes={})
    new_attributes = new_attributes.with_indifferent_access

    self.share_transaction = new_attributes.delete(:share_transaction) || ShareTransaction.new

    new_attributes.each do |k, v|
      send("#{k}=", v)
    end
  end
<commit_msg>ShareApplication: Fix failure to execute ModelWrapper#initialize.<commit_after>require 'one_click_orgs/model_wrapper'

# Represents a ShareTransaction that transfers shares from
# the organisation's account to the user's account.
class ShareApplication < OneClickOrgs::ModelWrapper
  attr_accessor :share_transaction
  attr_reader :member

  delegate :amount, :amount=, :to => :share_transaction

  def before_initialize(attributes)
    self.share_transaction = attributes.delete(:share_transaction) || ShareTransaction.new
  end

{'fraction_non_alphanumeric': 0.08165057067603161, 'fraction_numerical': 0.0, 'mean_word_length': 5.993865030674846, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1339853', 'n_tokens_mistral': 318, 'n_tokens_neox': 306, 'n_words': 82}