Sha256: 847e7f13f72f577edbed2619aa0acb02e6856f80925d86002a9cbd49a537f2ba

Contents?: true

Size: 342 Bytes

Versions: 44

Compression:

Stored size: 342 Bytes

Contents

module Tins
  module AskAndSend
    def ask_and_send(method_name, *args, &block)
      if respond_to?(method_name)
        __send__(method_name, *args, &block)
      end
    end

    def ask_and_send!(method_name, *args, &block)
      if respond_to?(method_name, true)
        __send__(method_name, *args, &block)
      end
    end
  end
end

Version data entries

44 entries across 43 versions & 3 rubygems

Version Path
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/tins-0.13.2/lib/tins/ask_and_send.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/tins-0.13.2/lib/tins/ask_and_send.rb
tdiary-5.0.8 vendor/bundle/gems/tins-0.13.2/lib/tins/ask_and_send.rb
tdiary-5.0.8 vendor/bundle/ruby/2.5.0/gems/tins-0.13.2/lib/tins/ask_and_send.rb
tins-1.3.0 lib/tins/ask_and_send.rb
tins-1.2.0 lib/tins/ask_and_send.rb
tins-1.1.0 lib/tins/ask_and_send.rb
tins-1.0.1 lib/tins/ask_and_send.rb
tins-1.0.0 lib/tins/ask_and_send.rb
tins-0.13.2 lib/tins/ask_and_send.rb
social_url_stats-0.0.1 vendor/ruby/1.9.1/gems/tins-0.13.1/lib/tins/ask_and_send.rb
tins-0.13.1 lib/tins/ask_and_send.rb
tins-0.13.0 lib/tins/ask_and_send.rb
tins-0.12.0 lib/tins/ask_and_send.rb
tins-0.11.0 lib/tins/ask_and_send.rb
tins-0.10.0 lib/tins/ask_and_send.rb
tins-0.9.0 lib/tins/ask_and_send.rb
tins-0.8.4 lib/tins/ask_and_send.rb
tins-0.8.3 lib/tins/ask_and_send.rb
tins-0.8.2 lib/tins/ask_and_send.rb