Class: Modelizer::FixtureContext

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#instancesObject

Returns the value of attribute instances

Returns:

  • (Object)

    the current value of instances



110
111
112
# File 'lib/modelizer.rb', line 110

def instances
  @instances
end

Instance Method Details

#identify(name) ⇒ Object



111
112
113
# File 'lib/modelizer.rb', line 111

def identify name
  Modelizer.identify name
end

#use(name) ⇒ Object



115
116
117
# File 'lib/modelizer.rb', line 115

def use name
  instances[name] or raise "Can't find the \"#{name}\" fixture."
end