Class: FactoryGirl::Attribute::Static

Inherits:
FactoryGirl::Attribute show all
Defined in:
lib/factory_girl/attribute/static.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from FactoryGirl::Attribute

#ignored, #name

Instance Method Summary collapse

Methods inherited from FactoryGirl::Attribute

#alias_for?, #association?

Constructor Details

#initialize(name, value, ignored) ⇒ Static

Returns a new instance of Static.



4
5
6
7
# File 'lib/factory_girl/attribute/static.rb', line 4

def initialize(name, value, ignored)
  super(name, ignored)
  @value = value
end

Instance Method Details

#to_procObject



9
10
11
12
# File 'lib/factory_girl/attribute/static.rb', line 9

def to_proc
  value = @value
  lambda { value }
end