Sha256: 83ee812eb140a24b02b6778fdf66c59dcbb9491f84f0eca740b2c148f668ab55
Contents?: true
Size: 972 Bytes
Versions: 15
Compression:
Stored size: 972 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Utils module Method class Defined < Support::Command ## # @!attribute [r] method # @return [Class] # attr_reader :method ## # @!attribute [r] klass # @return [Class] # attr_reader :klass ## # @!attribute [r] klass # @return [Class] # attr_reader :private ## # @param method [Symbol, String] # @param klass [Class] # @return [void] # def initialize(method, klass, private: false) @method = method.to_s @klass = klass @private = private end ## # @return [void] # def call return true if klass.method_defined?(method) return klass.private_method_defined?(method) if private false end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems