Q:

ruby class method with decorator

I want to have separate classes with instant_method and class_method as follow:
module ObjReviewModule  ## common methods module
  def own_methods(obj_)
    ruby_methods = " ".methods & 1.methods
    (obj_.methods - ruby_methods).map { |x| x.to_s }
  end

  def specific_methods(obj_,existing_=[])
    self.own_methods(obj_).select { |x| !existing_.include?(x) }
  end
end

class ObjReviewMethod ## instance_method 
  include ObjReviewModule 

  def get_(obj_)
    own_methods(obj_).select { |x| x.start_with?("get") }
  end

  def to_(obj_)
    own_methods(obj_).select{ |x| x.start_with?("to_") }
  end
end

class ObjList < OsObjReviewMethod ## class_method 
  extend ObjReviewModule

  def self.get_methods(obj_)
    # something should be here to make OsObjReviewMethod instance_method became class_method
  end
end

I got ObjReviewMethod worked as
object_methods = ObjReviewMethod.new
object_methods.get_(obj_) => get "own_methods" start with "get" using instance_class_method
ObjList.own_methods(obj_) => get "own_methods" with class_method

but i could not figure out how to get class_method without rewrite all definitions :
ObjList.get_methods(obj_) => get all "own_methods" start with "get" using class_method

It would be perfect if  decorator class could use all instance_method of base class as class_method

A:

Got solutions as below
module ObjReviewModule  ## common methods module
  def own_methods(obj_)
    ruby_methods = " ".methods & 1.methods
    (obj_.methods - ruby_methods).map { |x| x.to_s }
  end

  def specific_methods(obj_,existing_=[])
    self.own_methods(obj_).select { |x| !existing_.include?(x) }
  end
end

module ObjReviewMethod 
  include ObjReviewModule 
  def get_(obj_)
    own_methods(obj_).select { |x| x.start_with?("get") }
  end
  def to_(obj_)
    own_methods(obj_).select{ |x| x.start_with?("to_") }
  end
end

class ObjList ## class_method 
  extend ObjReviewModule
  extend ObjReviewMethod
end

class ObjReview ## instance_method 
  include ObjReviewModule
  include ObjReviewMethod
end

