module Cattri::Visibility
def __cattri_visibility
-
(Symbol)
- :public, :protected, or :private
def __cattri_visibility @__cattri_visibility ||= :public end
def private(*args)
-
(void)
-
Parameters:
-
args
(Array
) -- method names to make private, or empty to set context
def private(*args) @__cattri_visibility = :private if args.empty? Module.instance_method(:private).bind(self).call(*args) end
def protected(*args)
-
(void)
-
Parameters:
-
args
(Array
) -- method names to make protected, or empty to set context
def protected(*args) @__cattri_visibility = :protected if args.empty? Module.instance_method(:protected).bind(self).call(*args) end
def public(*args)
-
(void)
-
Parameters:
-
args
(Array
) -- method names to make public, or empty to set context
def public(*args) @__cattri_visibility = :public if args.empty? Module.instance_method(:public).bind(self).call(*args) end