File: declaration.rb

package info (click to toggle)
ruby-factory-bot 6.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,372 kB
  • sloc: ruby: 7,827; makefile: 6
file content (23 lines) | stat: -rw-r--r-- 398 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require "factory_bot/declaration/dynamic"
require "factory_bot/declaration/association"
require "factory_bot/declaration/implicit"

module FactoryBot
  # @api private
  class Declaration
    attr_reader :name

    def initialize(name, ignored = false)
      @name = name
      @ignored = ignored
    end

    def to_attributes
      build
    end

    protected

    attr_reader :ignored
  end
end