Module: Inclusive::Public

Included in:
Inclusive
Defined in:
lib/inclusive.rb

Overview

You can extend a module with this in order to use ‘public_function`, which is the same as Ruby’s native ‘module_function` except the instance method retains public visibility—a necessity for packaging via Inclusive.

Instance Method Summary collapse

Instance Method Details

#public_function(method_name) ⇒ Object



13
14
15
16
# File 'lib/inclusive.rb', line 13

def public_function(method_name)
  module_function method_name
  public method_name # reset back to public visibility
end