Class: FactoryBot::Attribute Private
- Inherits:
-
Object
- Object
- FactoryBot::Attribute
- Defined in:
- lib/factory_bot/attribute.rb,
lib/factory_bot/attribute/dynamic.rb,
lib/factory_bot/attribute/sequence.rb,
lib/factory_bot/attribute/association.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Defined Under Namespace
Classes: Association, Dynamic, Sequence
Instance Attribute Summary collapse
- #ignored ⇒ Object readonly private
- #name ⇒ Object readonly private
Instance Method Summary collapse
- #alias_for?(attr) ⇒ Boolean private
- #association? ⇒ Boolean private
-
#initialize(name, ignored) ⇒ Attribute
constructor
private
A new instance of Attribute.
- #to_proc ⇒ Object private
Constructor Details
#initialize(name, ignored) ⇒ Attribute
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.
Returns a new instance of Attribute.
10 11 12 13 |
# File 'lib/factory_bot/attribute.rb', line 10 def initialize(name, ignored) @name = name.to_sym @ignored = ignored end |
Instance Attribute Details
#ignored ⇒ Object (readonly)
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.
8 9 10 |
# File 'lib/factory_bot/attribute.rb', line 8 def ignored @ignored end |
#name ⇒ Object (readonly)
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.
8 9 10 |
# File 'lib/factory_bot/attribute.rb', line 8 def name @name end |
Instance Method Details
#alias_for?(attr) ⇒ Boolean
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.
23 24 25 |
# File 'lib/factory_bot/attribute.rb', line 23 def alias_for?(attr) FactoryBot.aliases_for(attr).include?(name) end |
#association? ⇒ Boolean
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.
19 20 21 |
# File 'lib/factory_bot/attribute.rb', line 19 def association? false end |
#to_proc ⇒ 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.
15 16 17 |
# File 'lib/factory_bot/attribute.rb', line 15 def to_proc -> {} end |