<commit_before>= Method Decorator

Provides a way to dynamically override methods without losing original behavior.

== Example

For a given class (with unnecessary complex logic, just to make a point):

    class SomeClass

        def some_method(some_arg)
            puts some_arg
        end

        include MethodDecorator

        method_to_override = :some_method
        decorate_method method_to_override do |*args|
            puts :decorated_some_method
            call_original_method method_to_override, *args
        end

    end

This call:

    SomeClass.new.some_method 'some arg'

Produces this output:

    decorated_some_method
    some arg<commit_msg>adding donate button to readme<commit_after>= Method Decorator

Provides a way to dynamically override methods without losing original behavior.

== Example

For a given class (with unnecessary complex logic, just to make a point):

    class SomeClass

        def some_method(some_arg)
            puts some_arg
        end

        include MethodDecorator

        method_to_override = :some_method
        decorate_method method_to_override do |*args|
            puts :decorated_some_method
            call_original_method method_to_override, *args
        end

    end

This call:

    SomeClass.new.some_method 'some arg'

Produces this output:

    decorated_some_method
    some arg

===

{<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate" />}[https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AMPXM3PW6CTBE]
{'fraction_non_alphanumeric': 0.06015523932729625, 'fraction_numerical': 0.00129366106080207, 'mean_word_length': 2.9464285714285716, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1111624', 'n_tokens_mistral': 463, 'n_tokens_neox': 450, 'n_words': 129}