Sha256: 59d7d8526fbc126543b0e3df58784e381c91072da7203aae490395a334c0d551

Contents?: true

Size: 744 Bytes

Versions: 17

Compression:

Stored size: 744 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/acts_as_instance_method'
require 'eac_ruby_utils/patches/class/common_constructor'
require 'eac_ruby_utils/patches/module/common_concern'

module EacRubyUtils
  module MethodClass
    common_concern do
      ::EacRubyUtils::MethodClass::Setup.new(self)
    end

    class Setup < ::EacRubyUtils::ActsAsInstanceMethod
      common_constructor :method_class, :static_method, default: [false],
                                                        super_args: -> { [method_class] } do
        perform
      end

      def perform
        setup
      end

      def default_sender_module
        r = super
        r = r.singleton_class if static_method
        r
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
eac_ruby_utils-0.123.0 lib/eac_ruby_utils/method_class.rb
eac_ruby_utils-0.121.0 lib/eac_ruby_utils/method_class.rb
eac_ruby_utils-0.120.0 lib/eac_ruby_utils/method_class.rb
eac_tools-0.76.1 sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb
eac_tools-0.76.0 sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb
eac_tools-0.75.2 sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb
eac_ruby_utils-0.119.2 lib/eac_ruby_utils/method_class.rb
eac_tools-0.75.1 sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb
eac_tools-0.75.0 sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb
eac_ruby_utils-0.119.1 lib/eac_ruby_utils/method_class.rb
eac_tools-0.74.1 sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb
eac_tools-0.74.0 sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb
eac_tools-0.73.0 sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb
eac_ruby_utils-0.119.0 lib/eac_ruby_utils/method_class.rb
eac_tools-0.72.0 sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb
eac_ruby_utils-0.118.1 lib/eac_ruby_utils/method_class.rb
eac_ruby_utils-0.118.0 lib/eac_ruby_utils/method_class.rb