class Object
Public Instance Methods
Fabricate(name, overrides = {}, &block)
click to toggle source
# File lib/fabrication.rb, line 65 def Fabricate(name, overrides = {}, &block) Fabricate.create(name, overrides, &block) end
Fabricator(name, options = {}, &block)
click to toggle source
rubocop:disable Naming/MethodName
# File lib/fabrication.rb, line 61 def Fabricator(name, options = {}, &block) Fabrication.manager.register(name, options, &block) end
with_ivars(fabricator) { |fabricator| ... }
click to toggle source
# File lib/rails/generators/fabrication/cucumber_steps/templates/fabrication_steps.rb, line 7 def with_ivars(fabricator) @they = yield fabricator model = @they.last.class.to_s.underscore instance_variable_set("@#{model.pluralize}", @they) instance_variable_set("@#{model.singularize}", @they.last) Fabrication::Cucumber::Fabrications[model.singularize.gsub(/\W+/, '_').downcase] = @they.last end