Class: Applyrics::StringsFile::Generator

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

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Generator

Returns a new instance of Generator.



48
49
50
# File 'lib/applyrics/stringsfile.rb', line 48

def initialize(data)
  @hash = data
end

Instance Method Details

#runObject



52
53
54
55
56
# File 'lib/applyrics/stringsfile.rb', line 52

def run
  @hash.each do |key,value|
    yield "\"#{key}\" = \"#{value}\"\n" if block_given?
  end
end