Class: ActiveRecord::Base

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

Class Method Summary collapse

Class Method Details

.dump_to_yaml(options = {}) ⇒ Object



72
73
74
# File 'lib/ar_dumper_active_record.rb', line 72

def self.dump_to_yaml(options={})
  dumper :yml, options
end

.dumper(format, options = {}) ⇒ Object

dump to specified format



77
78
79
# File 'lib/ar_dumper_active_record.rb', line 77

def self.dumper(format, options={})
  ArDumper.new(self, options).dump(format)
end

.dumper_to_string(format, options = {}) ⇒ Object

dump to string



82
83
84
# File 'lib/ar_dumper_active_record.rb', line 82

def self.dumper_to_string(format, options={})
  dumper(format, options.update({:target_type => :string}))
end

.to_csv(options = {}) ⇒ Object



68
69
70
# File 'lib/ar_dumper_active_record.rb', line 68

def self.to_csv(options={})
  dump_to_string :csv, options
end