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.
-
#localization_languages ⇒ Object
Returns the value of attribute localization_languages.
-
#name ⇒ Object
Returns the value of attribute name.
-
#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.
12 13 14 |
# File 'lib/babelyoda/specification.rb', line 12 def engine @engine 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 |
#resources_folder ⇒ Object
Returns the value of attribute resources_folder.
14 15 16 |
# File 'lib/babelyoda/specification.rb', line 14 def resources_folder @resources_folder end |
#scm ⇒ Object
Returns the value of attribute scm.
17 18 19 |
# File 'lib/babelyoda/specification.rb', line 17 def scm @scm end |
#source_files ⇒ Object
Returns the value of attribute source_files.
13 14 15 |
# File 'lib/babelyoda/specification.rb', line 13 def source_files @source_files end |
#strings_files ⇒ Object
Returns the value of attribute strings_files.
16 17 18 |
# File 'lib/babelyoda/specification.rb', line 16 def strings_files @strings_files end |
#xib_files ⇒ Object
Returns the value of attribute xib_files.
15 16 17 |
# File 'lib/babelyoda/specification.rb', line 15 def xib_files @xib_files end |
Class Method Details
.generate_default_babelfile ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/babelyoda/specification.rb', line 21 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
29 30 31 32 33 34 |
# File 'lib/babelyoda/specification.rb', line 29 def self.load trace_spec = @spec.nil? && ::Rake.application..trace @spec ||= load_from_file(filename = FILENAME) @spec.dump if trace_spec && @spec return @spec end |
Instance Method Details
#all_languages ⇒ Object
36 37 38 |
# File 'lib/babelyoda/specification.rb', line 36 def all_languages [ development_language, localization_languages].flatten! end |