Class: I15R::Config
- Inherits:
-
Object
- Object
- I15R::Config
- Defined in:
- lib/i15r.rb
Instance Method Summary collapse
- #add_default ⇒ Object
- #dry_run? ⇒ Boolean
-
#initialize(config) ⇒ Config
constructor
A new instance of Config.
- #override_i18n_method ⇒ Object
- #prefix ⇒ Object
- #prefix_with_path ⇒ Object
Constructor Details
#initialize(config) ⇒ Config
Returns a new instance of Config.
8 9 10 |
# File 'lib/i15r.rb', line 8 def initialize(config) @options = config end |
Instance Method Details
#add_default ⇒ Object
24 25 26 |
# File 'lib/i15r.rb', line 24 def add_default @options.fetch(:add_default, true) end |
#dry_run? ⇒ Boolean
20 21 22 |
# File 'lib/i15r.rb', line 20 def dry_run? @options.fetch(:dry_run, false) end |
#override_i18n_method ⇒ Object
28 29 30 |
# File 'lib/i15r.rb', line 28 def override_i18n_method @options.fetch(:override_i18n_method, nil) end |
#prefix ⇒ Object
12 13 14 |
# File 'lib/i15r.rb', line 12 def prefix @options.fetch(:prefix, nil) || prefix_with_path end |
#prefix_with_path ⇒ Object
16 17 18 |
# File 'lib/i15r.rb', line 16 def prefix_with_path @options.fetch(:prefix_with_path, nil) end |