Class: Synvert::Core::Configuration
- Inherits:
-
Object
- Object
- Synvert::Core::Configuration
- Defined in:
- lib/synvert/core/configuration.rb
Overview
Synvert global configuration.
Class Attribute Summary collapse
-
.number_of_workers ⇒ Integer
Number of workers.
-
.only_paths ⇒ Array<String>
Get a list of only paths.
-
.root_path ⇒ String
Get the path.
-
.show_run_process ⇒ Boolean
Check if show run process.
-
.single_quote ⇒ Boolean
Use single quote or double quote.
-
.skip_paths ⇒ Array<String>
Get a list of skip paths.
-
.strict ⇒ Boolean
Returns the value of the strict flag.
- .strict, if strict is false, it will ignore ruby version and gem version check.= ⇒ Object writeonly
-
.tab_width ⇒ Integer
Returns the tab width used for indentation.
-
.test_result ⇒ String
Returns the value of the test_result flag.
- .test_result, default is 'actions', it can be 'actions' or 'new_source'.= ⇒ Object writeonly
Class Attribute Details
.number_of_workers ⇒ Integer
Number of workers
57 58 59 |
# File 'lib/synvert/core/configuration.rb', line 57 def number_of_workers @number_of_workers || 1 end |
.only_paths ⇒ Array<String>
Get a list of only paths.
43 44 45 |
# File 'lib/synvert/core/configuration.rb', line 43 def only_paths @only_paths || [] end |
.root_path ⇒ String
Get the path.
29 30 31 |
# File 'lib/synvert/core/configuration.rb', line 29 def root_path @root_path || '.' end |
.show_run_process ⇒ Boolean
Check if show run process.
50 51 52 |
# File 'lib/synvert/core/configuration.rb', line 50 def show_run_process @show_run_process || false end |
.single_quote ⇒ Boolean
Use single quote or double quote.
64 65 66 |
# File 'lib/synvert/core/configuration.rb', line 64 def single_quote @single_quote.nil? ? true : @single_quote end |
.skip_paths ⇒ Array<String>
Get a list of skip paths.
36 37 38 |
# File 'lib/synvert/core/configuration.rb', line 36 def skip_paths @skip_paths || [] end |
.strict ⇒ Boolean
Returns the value of the strict flag.
If the strict flag is not set, it returns true by default.
82 83 84 |
# File 'lib/synvert/core/configuration.rb', line 82 def strict @strict.nil? ? true : @strict end |
.strict, if strict is false, it will ignore ruby version and gem version check.=(value) ⇒ Object (writeonly)
16 17 18 19 20 21 22 23 24 |
# File 'lib/synvert/core/configuration.rb', line 16 attr_writer :root_path, :skip_paths, :only_paths, :show_run_process, :number_of_workers, :single_quote, :tab_width, :strict, :test_result |
.tab_width ⇒ Integer
Returns the tab width used for indentation.
If the tab width is not explicitly set, it defaults to 2.
73 74 75 |
# File 'lib/synvert/core/configuration.rb', line 73 def tab_width @tab_width || 2 end |
.test_result ⇒ String
Returns the value of the test_result flag.
If the test_result flag is not set, it returns 'actions' by default.
91 92 93 |
# File 'lib/synvert/core/configuration.rb', line 91 def test_result @test_result || 'actions' end |
.test_result, default is 'actions', it can be 'actions' or 'new_source'.=(value) ⇒ Object (writeonly)
16 17 18 19 20 21 22 23 24 |
# File 'lib/synvert/core/configuration.rb', line 16 attr_writer :root_path, :skip_paths, :only_paths, :show_run_process, :number_of_workers, :single_quote, :tab_width, :strict, :test_result |