Class: ActiveFactory::CreationContext

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_factory.rb

Overview

defines methods that can be used in a model definition model - the model under construction index - index of the model in the factory context - spec context where the models {} block was evaluated

Instance Attribute Summary collapse

Instance Attribute Details

#contextObject

Returns the value of attribute context

Returns:

  • (Object)

    the current value of context



99
100
101
# File 'lib/active_factory.rb', line 99

def context
  @context
end

#indexObject Also known as: i

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



99
100
101
# File 'lib/active_factory.rb', line 99

def index
  @index
end

#modelObject

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



99
100
101
# File 'lib/active_factory.rb', line 99

def model
  @model
end