Class: Babelyoda::Specification
- Inherits:
-
Object
- Object
- Babelyoda::Specification
- Includes:
- SpecificationLoader
- Defined in:
- lib/babelyoda/specification.rb
Constant Summary collapse
- FILENAME =
'Babelfile'
Instance Attribute Summary collapse
-
#development_language ⇒ Object
Returns the value of attribute development_language.
-
#engine ⇒ Object
Returns the value of attribute engine.
-
#length_checker_params ⇒ Object
Returns the value of attribute length_checker_params.
-
#localization_languages ⇒ Object
Returns the value of attribute localization_languages.
-
#name ⇒ Object
Returns the value of attribute name.
-
#plain_text_keys ⇒ Object
Returns the value of attribute plain_text_keys.
-
#resources_folder ⇒ Object
Returns the value of attribute resources_folder.
-
#scm ⇒ Object
Returns the value of attribute scm.
-
#source_files ⇒ Object
Returns the value of attribute source_files.
-
#strings_files ⇒ Object
Returns the value of attribute strings_files.
-
#xib_files ⇒ Object
Returns the value of attribute xib_files.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from SpecificationLoader
#dump, included, #initialize, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Babelyoda::SpecificationLoader
Instance Attribute Details
#development_language ⇒ Object
Returns the value of attribute development_language.
10 11 12 |
# File 'lib/babelyoda/specification.rb', line 10 def development_language @development_language end |
#engine ⇒ Object
Returns the value of attribute engine.
13 14 15 |
# File 'lib/babelyoda/specification.rb', line 13 def engine @engine end |
#length_checker_params ⇒ Object
Returns the value of attribute length_checker_params.
19 20 21 |
# File 'lib/babelyoda/specification.rb', line 19 def length_checker_params @length_checker_params end |
#localization_languages ⇒ Object
Returns the value of attribute localization_languages.
11 12 13 |
# File 'lib/babelyoda/specification.rb', line 11 def localization_languages @localization_languages end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/babelyoda/specification.rb', line 9 def name @name end |
#plain_text_keys ⇒ Object
Returns the value of attribute plain_text_keys.
12 13 14 |
# File 'lib/babelyoda/specification.rb', line 12 def plain_text_keys @plain_text_keys end |
#resources_folder ⇒ Object
Returns the value of attribute resources_folder.
15 16 17 |
# File 'lib/babelyoda/specification.rb', line 15 def resources_folder @resources_folder end |
#scm ⇒ Object
Returns the value of attribute scm.
18 19 20 |
# File 'lib/babelyoda/specification.rb', line 18 def scm @scm end |
#source_files ⇒ Object
Returns the value of attribute source_files.
14 15 16 |
# File 'lib/babelyoda/specification.rb', line 14 def source_files @source_files end |
#strings_files ⇒ Object
Returns the value of attribute strings_files.
17 18 19 |
# File 'lib/babelyoda/specification.rb', line 17 def strings_files @strings_files end |
#xib_files ⇒ Object
Returns the value of attribute xib_files.
16 17 18 |
# File 'lib/babelyoda/specification.rb', line 16 def xib_files @xib_files end |
Class Method Details
.generate_default_babelfile ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/babelyoda/specification.rb', line 23 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 |
.load ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/babelyoda/specification.rb', line 31 def self.load trace_spec = @spec.nil? && ::Rake.application..trace @spec ||= load_from_file(filename = FILENAME) if @spec @spec.plain_text_keys = true if @spec.plain_text_keys.nil? @spec.dump if trace_spec && @spec end return @spec end |
Instance Method Details
#all_languages ⇒ Object
41 42 43 |
# File 'lib/babelyoda/specification.rb', line 41 def all_languages [ development_language, localization_languages].flatten! end |