Class: FactoryGirl::Decorator

Inherits:
BasicObject
Defined in:
lib/factory_girl/decorator.rb,
lib/factory_girl/decorator/attribute_hash.rb,
lib/factory_girl/decorator/class_key_hash.rb,
lib/factory_girl/decorator/new_constructor.rb,
lib/factory_girl/decorator/invocation_tracker.rb,
lib/factory_girl/decorator/disallows_duplicates_registry.rb

Direct Known Subclasses

AttributeHash, ClassKeyHash, DisallowsDuplicatesRegistry, InvocationTracker, NewConstructor

Defined Under Namespace

Classes: AttributeHash, ClassKeyHash, DisallowsDuplicatesRegistry, InvocationTracker, NewConstructor

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Decorator) initialize(component)

Returns a new instance of Decorator



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

def initialize(component)
  @component = component
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(name, *args, &block)



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

def method_missing(name, *args, &block)
  @component.send(name, *args, &block)
end

Class Method Details

+ (Object) const_missing(name)



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

def self.const_missing(name)
  ::Object.const_get(name)
end

Instance Method Details

- (Object) send(symbol, *args)



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

def send(symbol, *args)
  __send__(symbol, *args)
end