Class: Modelizer::Context

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



36
37
38
# File 'lib/modelizer.rb', line 36

def instances
  @instances
end

Instance Method Details

#identify(name) ⇒ Object



37
38
39
# File 'lib/modelizer.rb', line 37

def identify name
  Modelizer.identify name
end

#use(name) ⇒ Object



41
42
43
# File 'lib/modelizer.rb', line 41

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