Module: FactoryGirl::Syntax::Sham::Sham Private
- Defined in:
- lib/factory_girl/syntax/sham.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .method_missing(name, *args, &block) ⇒ Object private
-
.name(&block) ⇒ Object
private
overrides name on Module.
Class Method Details
.method_missing(name, *args, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 31 32 33 34 35 36 |
# File 'lib/factory_girl/syntax/sham.rb', line 28 def self.method_missing(name, *args, &block) if block_given? ActiveSupport::Deprecation.warn 'Sham.sequence is deprecated; use the FactoryGirl.define syntax instead', caller start_value = args.first FactoryGirl.register_sequence(Sequence.new(name, start_value || 1, &block)) else FactoryGirl.sequence_by_name(name).next end end |
.name(&block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
overrides name on Module
39 40 41 |
# File 'lib/factory_girl/syntax/sham.rb', line 39 def self.name(&block) method_missing('name', &block) end |