Class: Hydramata::Configuration

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

Instance Method Summary collapse

Instance Method Details

#translatorObject



5
6
7
8
9
10
# File 'lib/hydramata/configuration.rb', line 5

def translator
  @translator ||= begin
    require 'hydramata/core/translator'
    Core::Translator.new(base_scope: ['hydramata', 'core'])
  end
end

#translator=(object) ⇒ Object

Raises:



11
12
13
14
# File 'lib/hydramata/configuration.rb', line 11

def translator=(object)
  raise ConfigurationError.new("Expected #{self.class}#translator to respond_to #translate. #{object.inspect} does not respond to #translate") unless object.respond_to?(:translate)
  @translator = object
end