jr1shw
Last Updated: February 25, 2016
·
247
· bodacious
C5d2ca4998259d200a48e38847d19f06

Set each method in a module to a module-method via module_function

module MyMixin

  module_function

  def method_a
    'A'
  end

  def method_b
    "B"
  end

end
MyMixin.method_a # => "A"
MyMixin.method_b # => "B"
Say Thanks
Respond