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

Defined Under Namespace

Classes: AttributeHash, ClassKeyHash, DisallowsDuplicatesRegistry, InvocationTracker, NewConstructor

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(component) ⇒ Decorator

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

#method_missing(name, *args, &block) ⇒ Object



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

.const_missing(name) ⇒ Object



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

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

Instance Method Details

#send(symbol, *args, &block) ⇒ Object



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

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