Pattern: Missing explicit visibility for constant
Issue: -
By default, Ruby makes all class and module constants public, which litters the public API of the class or module. Explicitly declaring a visibility makes intent more clear, and prevents outside actors from touching private state.
# bad
class Test
BAR = 42
BAZ = 43
end
# good
class Test
BAR = 42
private_constant :BAR
BAZ = 43
public_constant :BAZ
end