class RR::Injections::Injection

Public Instance Methods

original_method() click to toggle source
# File lib/rr/injections/injection.rb, line 21
def original_method
  subject_class.instance_method(original_method_alias_name)
end
subject_has_method_defined?(method_name_in_question) click to toggle source
# File lib/rr/injections/injection.rb, line 13
def subject_has_method_defined?(method_name_in_question)
  class_instance_method_defined(subject_class, method_name_in_question)
end
subject_has_original_method?() click to toggle source
# File lib/rr/injections/injection.rb, line 17
def subject_has_original_method?
  subject_has_method_defined?(original_method_alias_name)
end

Protected Instance Methods

subject_respond_to_method?(subject, method_name) click to toggle source
# File lib/rr/injections/injection.rb, line 26
def subject_respond_to_method?(subject, method_name)
  subject_has_method_defined?(method_name) ||
    class_instance_method_defined(subject_class, :respond_to?) &&
    subject.respond_to?(method_name)
end