Class: Applyrics::StringsFile::Generator
- Inherits:
-
Object
- Object
- Applyrics::StringsFile::Generator
- Defined in:
- lib/applyrics/stringsfile.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ Generator
constructor
A new instance of Generator.
- #run ⇒ Object
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
#run ⇒ Object
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 |