jr1shw
Last Updated: February 25, 2016
·
266
· bodacious

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"