module TFBoy
TFBoy
is a utility to copy ActiveRecords from you data base and print out a Fixture file if you want.
The current supported output file formats are:
-
yaml
Public Class Methods
except(attrs)
click to toggle source
# File lib/test_fixture_boy.rb, line 32 def self.except(attrs) scanner.except(attrs) end
print(format)
click to toggle source
# File lib/test_fixture_boy.rb, line 36 def self.print(format) # Grab all the copied data from scanner copy_data = case format when :yaml scanner.print_yaml end copy_data[:format] = format printer = Printer.new copy_data printer.print end
scan(clear_cache = false) { || ... }
click to toggle source
# File lib/test_fixture_boy.rb, line 24 def self.scan(clear_cache = false) scanner.scan(clear_cache) { yield } end
scanner()
click to toggle source
# File lib/test_fixture_boy.rb, line 19 def self.scanner puts "scanner" @scanner ||= RecordScanner.new end
select(attrs)
click to toggle source
# File lib/test_fixture_boy.rb, line 28 def self.select(attrs) scanner.select(attrs) end
show_time()
click to toggle source
# File lib/test_fixture_boy.rb, line 48 def self.show_time TestFixtureBoy::Talents.introduce end