Class: I18nTemplate::Extractor::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/i18n_template/extractor/base.rb

Direct Known Subclasses

Gettext, Plain, Yaml

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Base

Returns a new instance of Base.



15
16
17
18
# File 'lib/i18n_template/extractor/base.rb', line 15

def initialize(options)
  @options = self.class.default_options.dup
  @options.merge!(options)
end

Class Method Details

.default_optionsObject



7
8
9
10
11
12
# File 'lib/i18n_template/extractor/base.rb', line 7

def default_options
  {
    :glob       => ['app/views/**/*.{erb,rhtml}'],
    :format     => 'gettext'
  }
end

Instance Method Details

#call(source) ⇒ Object

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/i18n_template/extractor/base.rb', line 20

def call(source)
  raise NotImplementedError, "'call' is not implemented by #{self.class.name}"
end