Class: Bashly::Settings
- Inherits:
-
Object
- Object
- Bashly::Settings
- Extended by:
- AssetHelper
- Defined in:
- lib/bashly/settings.rb
Class Attribute Summary collapse
- .commands_dir ⇒ Object
- .compact_short_flags ⇒ Object
- .config_path ⇒ Object
- .conjoined_flag_args ⇒ Object
- .lib_dir ⇒ Object
- .partials_extension ⇒ Object
- .source_dir ⇒ Object
- .strict ⇒ Object
- .tab_indent ⇒ Object
- .target_dir ⇒ Object
- .usage_colors ⇒ Object
Class Method Summary collapse
- .env ⇒ Object
- .env=(value) ⇒ Object
- .full_lib_dir ⇒ Object
- .production? ⇒ Boolean
- .strict_string ⇒ Object
Methods included from AssetHelper
Class Attribute Details
.commands_dir ⇒ Object
20 21 22 |
# File 'lib/bashly/settings.rb', line 20 def commands_dir @commands_dir ||= get :commands_dir end |
.compact_short_flags ⇒ Object
24 25 26 |
# File 'lib/bashly/settings.rb', line 24 def compact_short_flags @compact_short_flags ||= get :compact_short_flags end |
.config_path ⇒ Object
32 33 34 |
# File 'lib/bashly/settings.rb', line 32 def config_path @config_path ||= get(:config_path) % { source_dir: source_dir } end |
.conjoined_flag_args ⇒ Object
28 29 30 |
# File 'lib/bashly/settings.rb', line 28 def conjoined_flag_args @conjoined_flag_args ||= get :conjoined_flag_args end |
.lib_dir ⇒ Object
48 49 50 |
# File 'lib/bashly/settings.rb', line 48 def lib_dir @lib_dir ||= get :lib_dir end |
.partials_extension ⇒ Object
52 53 54 |
# File 'lib/bashly/settings.rb', line 52 def partials_extension @partials_extension ||= get :partials_extension end |
.source_dir ⇒ Object
60 61 62 |
# File 'lib/bashly/settings.rb', line 60 def source_dir @source_dir ||= get :source_dir end |
.strict ⇒ Object
64 65 66 |
# File 'lib/bashly/settings.rb', line 64 def strict @strict ||= get :strict end |
.tab_indent ⇒ Object
78 79 80 |
# File 'lib/bashly/settings.rb', line 78 def tab_indent @tab_indent ||= get :tab_indent end |
.target_dir ⇒ Object
82 83 84 |
# File 'lib/bashly/settings.rb', line 82 def target_dir @target_dir ||= get :target_dir end |
.usage_colors ⇒ Object
86 87 88 |
# File 'lib/bashly/settings.rb', line 86 def usage_colors @usage_colors ||= get :usage_colors end |
Class Method Details
.env ⇒ Object
36 37 38 |
# File 'lib/bashly/settings.rb', line 36 def env @env ||= get(:env)&.to_sym end |
.env=(value) ⇒ Object
40 41 42 |
# File 'lib/bashly/settings.rb', line 40 def env=(value) @env = value&.to_sym end |
.full_lib_dir ⇒ Object
44 45 46 |
# File 'lib/bashly/settings.rb', line 44 def full_lib_dir "#{source_dir}/#{lib_dir}" end |
.production? ⇒ Boolean
56 57 58 |
# File 'lib/bashly/settings.rb', line 56 def production? env == :production end |
.strict_string ⇒ Object
68 69 70 71 72 73 74 75 76 |
# File 'lib/bashly/settings.rb', line 68 def strict_string if strict.is_a? String strict elsif strict 'set -euo pipefail' else 'set -e' end end |