Class: FactoryGirl::Decorator::ClassKeyHash

Inherits:
FactoryGirl::Decorator show all
Defined in:
lib/factory_girl/decorator/class_key_hash.rb

Instance Method Summary collapse

Methods inherited from FactoryGirl::Decorator

const_missing, #initialize, #method_missing, #send

Constructor Details

This class inherits a constructor from FactoryGirl::Decorator

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class FactoryGirl::Decorator

Instance Method Details

#[](key) ⇒ Object



4
5
6
# File 'lib/factory_girl/decorator/class_key_hash.rb', line 4

def [](key)
  @component[symbolized_key key]
end

#[]=(key, value) ⇒ Object



8
9
10
# File 'lib/factory_girl/decorator/class_key_hash.rb', line 8

def []=(key, value)
  @component[symbolized_key key] = value
end

#key?(key) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/factory_girl/decorator/class_key_hash.rb', line 12

def key?(key)
  @component.key? symbolized_key(key)
end