Class: I15R::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/i15r.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Config

Returns a new instance of Config.



7
8
9
# File 'lib/i15r.rb', line 7

def initialize(config)
  @options = config
end

Instance Method Details

#add_defaultObject



23
24
25
# File 'lib/i15r.rb', line 23

def add_default
  @options.fetch(:add_default, true)
end

#dry_run?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/i15r.rb', line 19

def dry_run?
  @options.fetch(:dry_run, false)
end

#override_i18n_methodObject



27
28
29
# File 'lib/i15r.rb', line 27

def override_i18n_method
  @options.fetch(:override_i18n_method, nil)
end

#prefixObject



11
12
13
# File 'lib/i15r.rb', line 11

def prefix
  @options.fetch(:prefix, nil) || prefix_with_path
end

#prefix_with_pathObject



15
16
17
# File 'lib/i15r.rb', line 15

def prefix_with_path
  @options.fetch(:prefix_with_path, nil)
end