module KRPC::SuffixMethods
Constants
- DOCSTRING_SUFFIX
- DOCSTRING_SUFFIX_REGEX
Public Class Methods
included(base)
click to toggle source
# File lib/krpc/doc.rb, line 165 def self.included(base) base.extend self, ClassMethods end
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
Calls superclass method
# File lib/krpc/doc.rb, line 169 def method_missing(method, *args, &block) if DOCSTRING_SUFFIX_REGEX =~ method.to_s documented_method_name = $1 + $2.to_s if respond_to? documented_method_name.to_sym return puts Doc.docstring_for_method(self,documented_method_name) end end super end
respond_to_missing?(method, *)
click to toggle source
Calls superclass method
# File lib/krpc/doc.rb, line 179 def respond_to_missing?(method, *) if DOCSTRING_SUFFIX_REGEX =~ method.to_s return true if respond_to? ($1 + $2.to_s).to_sym end super end