Class: QuietQuality::Config::Options
- Inherits:
-
Object
- Object
- QuietQuality::Config::Options
- Defined in:
- lib/quiet_quality/config/options.rb
Constant Summary collapse
- LOGGING_LEVELS =
[:quiet, :light, :normal].freeze
Instance Attribute Summary collapse
-
#annotator ⇒ Object
Returns the value of attribute annotator.
-
#colorize ⇒ Object
writeonly
Sets the attribute colorize.
-
#comparison_branch ⇒ Object
Returns the value of attribute comparison_branch.
-
#exec_tool ⇒ Object
Returns the value of attribute exec_tool.
-
#executor ⇒ Object
Returns the value of attribute executor.
-
#logging ⇒ Object
Returns the value of attribute logging.
-
#message_format ⇒ Object
Returns the value of attribute message_format.
-
#tools ⇒ Object
Returns the value of attribute tools.
Instance Method Summary collapse
- #colorize? ⇒ Boolean
-
#initialize ⇒ Options
constructor
A new instance of Options.
- #light? ⇒ Boolean
- #quiet? ⇒ Boolean
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/quiet_quality/config/options.rb', line 6 def initialize @annotator = nil @executor = Executors::ConcurrentExecutor @tools = nil @exec_tool = nil @comparison_branch = nil @colorize = true @logging = :normal @message_format = nil end |
Instance Attribute Details
#annotator ⇒ Object
Returns the value of attribute annotator.
17 18 19 |
# File 'lib/quiet_quality/config/options.rb', line 17 def annotator @annotator end |
#colorize=(value) ⇒ Object (writeonly)
Sets the attribute colorize
19 20 21 |
# File 'lib/quiet_quality/config/options.rb', line 19 def colorize=(value) @colorize = value end |
#comparison_branch ⇒ Object
Returns the value of attribute comparison_branch.
17 18 19 |
# File 'lib/quiet_quality/config/options.rb', line 17 def comparison_branch @comparison_branch end |
#exec_tool ⇒ Object
Returns the value of attribute exec_tool.
17 18 19 |
# File 'lib/quiet_quality/config/options.rb', line 17 def exec_tool @exec_tool end |
#executor ⇒ Object
Returns the value of attribute executor.
17 18 19 |
# File 'lib/quiet_quality/config/options.rb', line 17 def executor @executor end |
#logging ⇒ Object
Returns the value of attribute logging.
18 19 20 |
# File 'lib/quiet_quality/config/options.rb', line 18 def logging @logging end |
#message_format ⇒ Object
Returns the value of attribute message_format.
17 18 19 |
# File 'lib/quiet_quality/config/options.rb', line 17 def @message_format end |
#tools ⇒ Object
Returns the value of attribute tools.
17 18 19 |
# File 'lib/quiet_quality/config/options.rb', line 17 def tools @tools end |
Instance Method Details
#colorize? ⇒ Boolean
26 27 28 |
# File 'lib/quiet_quality/config/options.rb', line 26 def colorize? !!@colorize end |
#light? ⇒ Boolean
34 35 36 |
# File 'lib/quiet_quality/config/options.rb', line 34 def light? logging == :light end |
#quiet? ⇒ Boolean
30 31 32 |
# File 'lib/quiet_quality/config/options.rb', line 30 def quiet? logging == :quiet end |
#to_h ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/quiet_quality/config/options.rb', line 38 def to_h { annotator: annotator, executor: executor.name, exec_tool: exec_tool, comparison_branch: comparison_branch, colorize: colorize?, logging: logging, message_format: , tools: tool_hashes_by_name } end |