Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/ar_dumper_active_record.rb
Class Method Summary collapse
- .dump_to_yaml(options = {}) ⇒ Object
-
.dumper(format, options = {}) ⇒ Object
dump to specified format.
-
.dumper_to_string(format, options = {}) ⇒ Object
dump to string.
- .to_csv(options = {}) ⇒ Object
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(={}) dumper :yml, 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, ={}) ArDumper.new(self, ).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, ={}) dumper(format, .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(={}) dump_to_string :csv, end |