Class: Locraft::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/locraft/generators/generator.rb

Direct Known Subclasses

ConstantsGenerator, StringsGenerator

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Generator

Returns a new instance of Generator.



3
4
5
# File 'lib/locraft/generators/generator.rb', line 3

def initialize(config)
  @config = config
end

Instance Method Details

#generate(_) ⇒ Object

Parameters:

  • _ ({ String => [Localization]})

    # localizations hash like #{ ‘Lang’ => [array of localizations] }

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/locraft/generators/generator.rb', line 12

def generate(_)
  raise NotImplementedError
end

#valid?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/locraft/generators/generator.rb', line 7

def valid?
  raise NotImplementedError
end