lib/symbiont/public_trigger.rb
# Returns a corresponding public method object of the actual context.
#
# @param method_name [String,Symbol] Method name
# @raise [::NameError]
# @raise [Symbiont::Trigger::ContextNoMethodError, ::NoMethodError]
# @return [Method]
#
# @see [Symbiont::Trigger#method]
#
# @api private
# @since 0.5.0
Returns a corresponding public method object of the actual context.
Returns a corresponding public method object of the actual context .
def method(method_name)
      __context__ = __actual_context__(method_name)
      begin
        __context__.method(method_name)
      rescue ::NoMethodError
        __context_singleton__ = __extract_singleton_class__(__context__)
        __context_singleton__.public_instance_method(method_name).bind(__context__)
      end
    end
def method ( method_name ) __context__ = __actual_context__ ( method_name ) begin __context__ . method ( method_name ) rescue :: NoMethodError __context_singleton__ = __extract_singleton_class__ ( __context__ ) __context_singleton__ . public_instance_method ( method_name ) . bind ( __context__ ) end end
Returns a corresponding public method object of the actual context.
Returns a corresponding public method object of the actual context .
# NOTE: #   block is used cuz #__actual_context__can raise #   ::NoMethodError (ContextNoMethodError) too (and we should raise it) # NOTE: #   this situation is caused when the context object does not respond #   to #method method (BasicObject instances for example). We can extract #   method objects via it's singleton class.
None
Method
None
None
method_name
None
see
None
api
None
since
None