Module: FactoryToys
- Defined in:
- lib/factory_toys.rb,
lib/factory_toys/parser.rb,
lib/factory_toys/f_factory.rb
Defined Under Namespace
Classes: CloseTagNotFoundError, FFactory, InternalForEachError, MissingEnvironmentError, MissingForeachListError, MissingScenarioError, Parser, UnknownInlineError
Class Attribute Summary collapse
-
.factories ⇒ Object
Returns the value of attribute factories.
-
.features_directory ⇒ Object
Returns the value of attribute features_directory.
-
.max_feature_length ⇒ Object
Returns the value of attribute max_feature_length.
-
.scenario ⇒ Object
Returns the value of attribute scenario.
-
.scenarios ⇒ Object
Returns the value of attribute scenarios.
-
.source_directory ⇒ Object
Returns the value of attribute source_directory.
Class Method Summary collapse
Class Attribute Details
.factories ⇒ Object
Returns the value of attribute factories.
12 13 14 |
# File 'lib/factory_toys.rb', line 12 def factories @factories end |
.features_directory ⇒ Object
Returns the value of attribute features_directory.
11 12 13 |
# File 'lib/factory_toys.rb', line 11 def features_directory @features_directory end |
.max_feature_length ⇒ Object
Returns the value of attribute max_feature_length.
14 15 16 |
# File 'lib/factory_toys.rb', line 14 def max_feature_length @max_feature_length end |
.scenario ⇒ Object
Returns the value of attribute scenario.
13 14 15 |
# File 'lib/factory_toys.rb', line 13 def scenario @scenario end |
.scenarios ⇒ Object
Returns the value of attribute scenarios.
13 14 15 |
# File 'lib/factory_toys.rb', line 13 def scenarios @scenarios end |
.source_directory ⇒ Object
Returns the value of attribute source_directory.
11 12 13 |
# File 'lib/factory_toys.rb', line 11 def source_directory @source_directory end |
Class Method Details
.features_location ⇒ Object
26 27 28 29 30 |
# File 'lib/factory_toys.rb', line 26 def features_location @features_location = ::RAILS_ROOT + '/' + self.features_directory rescue NameError raise MissingEnvironmentError end |
.source_location ⇒ Object
20 21 22 23 24 |
# File 'lib/factory_toys.rb', line 20 def source_location @source_location = ::RAILS_ROOT + '/' + self.source_directory rescue NameError raise MissingEnvironmentError end |
.update_features ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/factory_toys.rb', line 46 def update_features self.source_files.each do |file| ft = FactoryToys::FFactory.new(file) if self.update_required(file, ft.output_filename) ft.write end end end |