Hide getters from external types

This commit is contained in:
Michael Miller 2019-03-23 20:01:42 -06:00
parent bc8b608789
commit ebfec8058e

View file

@ -9,7 +9,7 @@ module Spectator
end end
# Random number generator to use. # Random number generator to use.
getter random = Random::DEFAULT protected getter random = Random::DEFAULT
@primary_formatter : Formatting::Formatter? @primary_formatter : Formatting::Formatter?
@additional_formatters = [] of Formatting::Formatter @additional_formatters = [] of Formatting::Formatter
@ -31,7 +31,7 @@ module Spectator
# Retrieves the formatters to use. # Retrieves the formatters to use.
# If one wasn't specified by the user, # If one wasn't specified by the user,
# then `#default_formatter` is returned. # then `#default_formatter` is returned.
def formatters protected def formatters
@additional_formatters + [(@primary_formatter || default_formatter)] @additional_formatters + [(@primary_formatter || default_formatter)]
end end
@ -52,7 +52,7 @@ module Spectator
end end
# Indicates whether fail-fast mode is enabled. # Indicates whether fail-fast mode is enabled.
def fail_fast? protected def fail_fast?
@fail_fast @fail_fast
end end
@ -68,7 +68,7 @@ module Spectator
# Indicates whether fail-fast mode is enabled. # Indicates whether fail-fast mode is enabled.
# That is, it is a failure if there are no tests. # That is, it is a failure if there are no tests.
def fail_blank? protected def fail_blank?
@fail_blank @fail_blank
end end
@ -84,7 +84,7 @@ module Spectator
# Indicates whether dry-run mode is enabled. # Indicates whether dry-run mode is enabled.
# In this mode, no tests are run, but output acts like they were. # In this mode, no tests are run, but output acts like they were.
def dry_run? protected def dry_run?
@dry_run @dry_run
end end
@ -104,12 +104,12 @@ module Spectator
end end
# Indicates whether tests are run in a random order. # Indicates whether tests are run in a random order.
def randomize? protected def randomize?
@randomize @randomize
end end
# Creates a configuration. # Creates a configuration.
def build : Config protected def build : Config
Config.new(self) Config.new(self)
end end
end end