<commit_before>Redeemable
==========

Usage
-----

### Add redeem capability to your ActiveRecord model

class Ticket < ActiveRecord::Base

    redeemable :valid_for => 30.days, :uses => 4, :code_length => 8

end

**Make sure that the model has attributes:**

code:string, uses:integer, issued_at:datetime, expires_at:datetime, created_at:datetime 


### Generate the model

    rails generate redeemable Ticket (with your attributes)

**Generator automatically adds the attributes of the model:**

code:string, uses:integer, issued_at:datetime, expires_at:datetime, created_at:datetime<commit_msg>readme, corrected code block format<commit_after>Redeemable
==========

Usage
-----

### Add redeem capability to your ActiveRecord model

    class Ticket < ActiveRecord::Base

        redeemable :valid_for => 30.days, :uses => 4, :code_length => 8

    end

**Make sure that the model has attributes:**

code:string, uses:integer, issued_at:datetime, expires_at:datetime, created_at:datetime 


### Generate the model

    rails generate redeemable Ticket (with your attributes)

**Generator automatically adds the attributes of the model:**

code:string, uses:integer, issued_at:datetime, expires_at:datetime, created_at:datetime
{'fraction_non_alphanumeric': 0.11300813008130081, 'fraction_numerical': 0.0065040650406504065, 'mean_word_length': 5.312820512820513, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '1579113', 'n_tokens_mistral': 365, 'n_tokens_neox': 334, 'n_words': 113}