Sha256: 8b19245d735ce599a7db7805cdc117c6d1bc7d8a7fadd0a731471408fd782a62
Contents?: true
Size: 1.14 KB
Versions: 4
Compression:
Stored size: 1.14 KB
Contents
require 'erb' require_relative 'specification_loader' module Babelyoda class Specification include Babelyoda::SpecificationLoader attr_accessor :name attr_accessor :development_language attr_accessor :localization_languages attr_accessor :plain_text_keys attr_accessor :engine attr_accessor :source_files attr_accessor :resources_folder attr_accessor :xib_files attr_accessor :strings_files attr_accessor :scm FILENAME = 'Babelfile' def initialize(*args) super @plain_text_keys = true end def self.generate_default_babelfile template_file_name = File.join(BABELYODA_PATH, 'templates', 'Babelfile.erb') template = File.read(template_file_name) File.open(FILENAME, "w+") do |f| f.write(ERB.new(template).result()) end end def self.load trace_spec = @spec.nil? && ::Rake.application.options.trace @spec ||= load_from_file(filename = FILENAME) @spec.dump if trace_spec && @spec return @spec end def all_languages [ development_language, localization_languages].flatten! end end end
Version data entries
4 entries across 4 versions & 1 rubygems