Class: FactoryGirl::Attribute::Static

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

Overview

:nodoc:

Instance Attribute Summary collapse

Attributes inherited from FactoryGirl::Attribute

#ignored, #name

Instance Method Summary collapse

Methods inherited from FactoryGirl::Attribute

#<=>, #aliases_for?, #association?

Constructor Details

#initialize(name, value, ignored) ⇒ Static

Returns a new instance of Static.



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

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Instance Method Details

#==(another) ⇒ Object



21
22
23
24
25
# File 'lib/factory_girl/attribute/static.rb', line 21

def ==(another)
  self.name == another.name &&
    self.value == another.value &&
    self.ignored == another.ignored
end

#add_to(proxy) ⇒ Object



13
14
15
# File 'lib/factory_girl/attribute/static.rb', line 13

def add_to(proxy)
  set_proxy_value(proxy, @value)
end

#priorityObject



17
18
19
# File 'lib/factory_girl/attribute/static.rb', line 17

def priority
  0
end